"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useInitApp = void 0; var _react = require("react"); var _reactRedux = require("react-redux"); var _alerts = require("../state/alerts/alerts"); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ // this hook will be use to reload all the data required in common view in app const useInitApp = () => { const dispatch = (0, _reactRedux.useDispatch)(); (0, _react.useEffect)(() => { dispatch(_alerts.getConnectorsAction.get()); }, [dispatch]); }; exports.useInitApp = useInitApp;