diff --git a/client/src/features/editors/list/EventListWrapper.jsx b/client/src/features/editors/list/EventListWrapper.jsx
index af1f6f5ec..5d5ab369d 100644
--- a/client/src/features/editors/list/EventListWrapper.jsx
+++ b/client/src/features/editors/list/EventListWrapper.jsx
@@ -1,5 +1,5 @@
import { useMutation, useQueryClient } from 'react-query';
-import { useEffect } from 'react';
+import { useCallback, useEffect } from 'react';
import {
eventsNamespace,
fetchAllEvents,
@@ -14,7 +14,7 @@ import EventList from './EventList';
import EventListMenu from '../../menu/EventListMenu.jsx';
import { showErrorToast } from '../../../common/helpers/toastManager';
import { useFetch } from '../../../app/hooks/useFetch.js';
-import EventListSkeleton from '../skeletons/EventListSkeleton.jsx';
+import Empty from '../../../common/state/Empty';
export default function EventListWrapper() {
const queryClient = useQueryClient();
@@ -164,7 +164,7 @@ export default function EventListWrapper() {
},
});
- const reorderEvent = useMutation(requestReorder, {
+ const reorderEvent = useMutation(requestReorder, {
// we optimistically update here
onMutate: async (data) => {
// cancel ongoing queries
@@ -203,7 +203,7 @@ export default function EventListWrapper() {
}, [isError]);
// Events API
- const eventsHandler = async (action, payload) => {
+ const eventsHandler = useCallback(async (action, payload) => {
switch (action) {
case 'add':
try {
@@ -289,7 +289,7 @@ export default function EventListWrapper() {
showErrorToast('Unrecognised request', action);
break;
}
- };
+ }, []);
return (
<>
@@ -297,7 +297,7 @@ export default function EventListWrapper() {
{status === 'success' ? (
) : (
-
+
)}
>
);
diff --git a/client/src/features/editors/list/MenuActionButtons.jsx b/client/src/features/editors/list/MenuActionButtons.jsx
index ad7505a60..24eb63ce2 100644
--- a/client/src/features/editors/list/MenuActionButtons.jsx
+++ b/client/src/features/editors/list/MenuActionButtons.jsx
@@ -1,18 +1,21 @@
import { Menu, MenuButton, MenuItem, MenuList } from '@chakra-ui/menu';
import { IconButton } from '@chakra-ui/button';
-import {
- FiZap,
- FiTrash2,
-} from 'react-icons/fi';
+import { FiZap, FiPlus, FiClock, FiMinusCircle } from 'react-icons/fi';
+import { useEffect } from 'react';
export default function MenuActionButtons(props) {
+ const { actionHandler } = props;
const menuStyle = {
color: '#000000',
backgroundColor: 'rgba(255,255,255,1)',
};
+ useEffect(() =>{
+ console.log('debug action button render')
+ })
+
return (
-