From 5d6fe05227c0473b8dfd60dba030a452e6119c46 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Fri, 22 Aug 2025 22:16:09 +0100 Subject: [PATCH] Fixed warnings and removed logging. --- src/components/Dashboard/common/CodeBlockEditor.jsx | 3 --- src/components/Dashboard/common/NotesPanel.jsx | 2 +- src/components/Dashboard/common/ObjectTable.jsx | 4 ++-- src/components/Dashboard/context/PrintServerContext.jsx | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/components/Dashboard/common/CodeBlockEditor.jsx b/src/components/Dashboard/common/CodeBlockEditor.jsx index 715351d..ebb5d0b 100644 --- a/src/components/Dashboard/common/CodeBlockEditor.jsx +++ b/src/components/Dashboard/common/CodeBlockEditor.jsx @@ -41,8 +41,6 @@ export default function CodeBlockEditor({ editorCode = JSON.stringify(code, null, 2) } - console.log(editorCode) - // Map language to CodeMirror extension const languageExtension = useMemo(() => { switch (language.toLowerCase()) { @@ -90,7 +88,6 @@ export default function CodeBlockEditor({ const handleOnChange = (value) => { if (typeof code == 'object' && language == 'json') { - console.log('Parsing object', JSON.parse(value)) onChange(JSON.parse(value)) } else { onChange(value) diff --git a/src/components/Dashboard/common/NotesPanel.jsx b/src/components/Dashboard/common/NotesPanel.jsx index 217fb43..47713a6 100644 --- a/src/components/Dashboard/common/NotesPanel.jsx +++ b/src/components/Dashboard/common/NotesPanel.jsx @@ -364,7 +364,7 @@ const NotesPanel = ({ _id, onNewNote, type }) => { /> )) }, - [loading, fetchData, expandedNotes, userProfile, handleNewChildNote] + [fetchData, expandedNotes, userProfile, handleNewChildNote] ) const handleNewNote = async () => { diff --git a/src/components/Dashboard/common/ObjectTable.jsx b/src/components/Dashboard/common/ObjectTable.jsx index bfcc38d..34eab30 100644 --- a/src/components/Dashboard/common/ObjectTable.jsx +++ b/src/components/Dashboard/common/ObjectTable.jsx @@ -268,7 +268,7 @@ const ObjectTable = forwardRef( loadPreviousPage() } }, - [lazyLoading, loadNextPage, loadPreviousPage, hasMore, pages] + [loadNextPage, loadPreviousPage, hasMore, pages] ) const reload = useCallback(async () => { @@ -293,7 +293,7 @@ const ObjectTable = forwardRef( const newEventHandler = useCallback(() => { reload() - }, [reload, type]) + }, [reload]) // Subscribe to real-time updates for all items useEffect(() => { diff --git a/src/components/Dashboard/context/PrintServerContext.jsx b/src/components/Dashboard/context/PrintServerContext.jsx index 82ecf2d..acdc81b 100644 --- a/src/components/Dashboard/context/PrintServerContext.jsx +++ b/src/components/Dashboard/context/PrintServerContext.jsx @@ -75,7 +75,7 @@ const PrintServerProvider = ({ children }) => { socketRef.current.disconnect() socketRef.current = null } - }, [token, messageApi]) + }, [token, messageApi, notificationApi]) return (