From a4a74ec827013807aeb46f400c6e509dd4dfadd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=B0=D1=81=D1=83=D0=BB?= Date: Mon, 25 Nov 2024 00:44:25 +0300 Subject: [PATCH] fix: remove extra consoles --- src/components/App/index.tsx | 8 -------- src/components/Auth/index.tsx | 2 +- .../ModalsContainer/AddNodeEdgeModal/Body/index.tsx | 5 ----- .../CreateBountyModal/CreateBounty/index.tsx | 2 +- src/modules/mindset/components/LandingPage/index.tsx | 6 ------ 5 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/components/App/index.tsx b/src/components/App/index.tsx index 94c170e9a..4e0464179 100644 --- a/src/components/App/index.tsx +++ b/src/components/App/index.tsx @@ -167,8 +167,6 @@ export const App = () => { queueRef.current = { nodes: [], edges: [] } - console.log(batchedData) - addNewNode(batchedData) } }, 3000) // Adjust delay as necessary @@ -299,8 +297,6 @@ export const App = () => { } ws.onmessage = (event) => { - console.log('Message from server:', event.data) - const data = JSON.parse(event.data) if (data.type === 'ping') { @@ -319,10 +315,6 @@ export const App = () => { ws.onerror = (error) => { console.error('WebSocket error:', error) } - - ws.onclose = () => { - console.log('WebSocket connection closed') - } }, [runningProjectId, setRunningProjectMessages]) useEffect(() => { diff --git a/src/components/Auth/index.tsx b/src/components/Auth/index.tsx index 5fce6b550..d1eebbb76 100644 --- a/src/components/Auth/index.tsx +++ b/src/components/Auth/index.tsx @@ -113,7 +113,7 @@ export const AuthGuard = ({ children }: PropsWithChildren) => { await handleAuth() } catch (error) { - console.log(error) + console.error(error) } } diff --git a/src/components/ModalsContainer/AddNodeEdgeModal/Body/index.tsx b/src/components/ModalsContainer/AddNodeEdgeModal/Body/index.tsx index c184629db..69b8b4d04 100644 --- a/src/components/ModalsContainer/AddNodeEdgeModal/Body/index.tsx +++ b/src/components/ModalsContainer/AddNodeEdgeModal/Body/index.tsx @@ -76,11 +76,6 @@ export const Body = () => { : { to: nodeFrom.ref_id, from: selectedToNode?.ref_id }), }) - const { ref_id: id } = nodeFrom - const { ref_id: selectedId } = selectedToNode - - console.log(id, selectedId) - closeHandler() } catch (error) { console.warn(error) diff --git a/src/components/ModalsContainer/CreateBountyModal/CreateBounty/index.tsx b/src/components/ModalsContainer/CreateBountyModal/CreateBounty/index.tsx index 686b1175a..cc3996bcb 100644 --- a/src/components/ModalsContainer/CreateBountyModal/CreateBounty/index.tsx +++ b/src/components/ModalsContainer/CreateBountyModal/CreateBounty/index.tsx @@ -52,7 +52,7 @@ export const CreateBounty: FC = ({ errMessage, handleClose }) => { setOptions(newOptions) } } catch (error) { - console.log('Error from get user details: ', error) + console.error('Error from get user details: ', error) } } diff --git a/src/modules/mindset/components/LandingPage/index.tsx b/src/modules/mindset/components/LandingPage/index.tsx index 09ccdd5a5..7550b5bfd 100644 --- a/src/modules/mindset/components/LandingPage/index.tsx +++ b/src/modules/mindset/components/LandingPage/index.tsx @@ -57,8 +57,6 @@ export const LandingPage = () => { try { const res = await handleSubmitForm({ source: inputValue }) - console.log(res) - if (res.data.project_id) { setRunningProjectId(res.data.project_id) } @@ -70,15 +68,11 @@ export const LandingPage = () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (err: any) { - console.log(err) - let errorMessage = NODE_ADD_ERROR if (err?.status === 400) { const res = await err.json() - console.log(res) - errorMessage = res.errorCode || res?.status || NODE_ADD_ERROR if (res.data.ref_id) {