import React, { useEffect } from 'react'; import cn from 'classnames'; import styles from 'Components/Client/Webhooks/webhooks.module.css'; import { Button, Divider, Icon, Loader, NoContent } from 'UI'; import AnimatedSVG from 'Shared/AnimatedSVG'; import { ICONS } from 'Shared/AnimatedSVG/AnimatedSVG'; import CustomEventItem from 'Components/Client/CustomEvents/CustomEventItem'; import { useStore } from 'App/mstore'; import { useModal } from 'Components/ModalContext'; import CustomEventForm from 'Components/Client/CustomEvents/CustomEventForm'; import { List } from 'antd'; function CustomEventsList() { const [loading, setLoading] = React.useState(false); const { customEventStore: store } = useStore(); const { openModal } = useModal(); // useEffect(() => { // setLoading(true); // store.fetchAll({}).finally(() => { // setLoading(false); // }); // setTimeout(() => { // setLoading(false); // }, 2000); // }, []); const init = () => { console.log('init'); showEvent(); }; const showEvent = (event?: any) => { openModal(, { title: event ? 'Edit Event' : 'Add Event', width: 400 }); }; return (

{'Events'}

Leverage webhook notifications on alerts to trigger custom callbacks.
None added yet
} size="small" show={store.list.length === 0} > ( )} /> ); } const mapStateToProps = (state: any) => ({ sites: state.getIn(['site', 'list']) }); export default CustomEventsList;