diff --git a/src/App.tsx b/src/App.tsx index a983363..bf83895 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -402,9 +402,7 @@ function App() { } useEffect(() => { chrome?.runtime?.sendMessage({ action: "getApiKey" }, (response) => { - console.log('goingggg', response) if (response) { - console.log('response', response) handleSetGlobalApikey(response) setApiKey(response); diff --git a/src/ExtStates/NotAuthenticated.tsx b/src/ExtStates/NotAuthenticated.tsx index 7c31d21..6cc167c 100644 --- a/src/ExtStates/NotAuthenticated.tsx +++ b/src/ExtStates/NotAuthenticated.tsx @@ -33,7 +33,6 @@ export const NotAuthenticated = ({ globalApiKey, handleSetGlobalApikey, }) => { - console.log("apiKey", apiKey); const [isValidApiKey, setIsValidApiKey] = useState(null); const [hasLocalNode, setHasLocalNode] = useState(null); const [useLocalNode, setUseLocalNode] = useState(false); @@ -57,12 +56,10 @@ export const NotAuthenticated = ({ const isLocal = cleanUrl(currentNode?.url) === "127.0.0.1:12391"; const handleFileChangeApiKey = (event) => { const file = event.target.files[0]; // Get the selected file - console.log('file', file) if (file) { const reader = new FileReader(); reader.onload = (e) => { const text = e.target.result; // Get the file content - console.log('text', text) setImportedApiKey(text); // Store the file content in the state }; @@ -95,7 +92,6 @@ export const NotAuthenticated = ({ { action: "getCustomNodesFromStorage" }, (response) => { if (response) { - console.log("response", response); setCustomNodes(response || []); } } @@ -109,11 +105,9 @@ export const NotAuthenticated = ({ currentNodeRef.current = currentNode }, [currentNode]) - console.log('currentNode', currentNode) const validateApiKey = useCallback(async (key) => { try { - console.log('currentNodeRef.current', currentNodeRef.current, key) if(!currentNodeRef.current) return const isLocalKey = cleanUrl(key?.url) === "127.0.0.1:12391"; const isCurrentNodeLocal = cleanUrl(currentNodeRef.current?.url) === "127.0.0.1:12391"; @@ -132,7 +126,6 @@ export const NotAuthenticated = ({ } else if(currentNodeRef.current) { payload = currentNodeRef.current; } - console.log('payload', payload) const url = `${payload?.url}/admin/apikey/test`; const response = await fetch(url, { method: "GET", @@ -144,12 +137,10 @@ export const NotAuthenticated = ({ // Assuming the response is in plain text and will be 'true' or 'false' const data = await response.text(); - console.log("data", data); if (data === "true") { chrome?.runtime?.sendMessage( { action: "setApiKey", payload }, (response) => { - console.log("setApiKey", response); if (response) { handleSetGlobalApikey(payload); setIsValidApiKey(true); @@ -189,7 +180,6 @@ export const NotAuthenticated = ({ const saveCustomNodes = (myNodes) => { let nodes = [...(myNodes || [])]; - console.log("customNodeToSaveIndex", customNodeToSaveIndex); if (customNodeToSaveIndex !== null) { nodes.splice(customNodeToSaveIndex, 1, { url, @@ -208,7 +198,6 @@ export const NotAuthenticated = ({ chrome?.runtime?.sendMessage( { action: "setCustomNodes", nodes }, (response) => { - console.log("setCustomNodes", response); if (response) { setMode("list"); setUrl("http://"); @@ -219,7 +208,6 @@ export const NotAuthenticated = ({ ); }; - console.log("render customNodes", customNodes, mode); return ( <> @@ -340,7 +328,6 @@ export const NotAuthenticated = ({ chrome?.runtime?.sendMessage( { action: "setApiKey", payload:null }, (response) => { - console.log("setApiKey", response); if (response) { setApiKey(null); handleSetGlobalApikey(null); @@ -519,12 +506,7 @@ export const NotAuthenticated = ({ const nodesToSave = [ ...(customNodes || []), ].filter((item) => item?.url !== node?.url); - console.log( - "nodesToSave", - nodesToSave, - customNodes, - node - ); + saveCustomNodes(nodesToSave); }} diff --git a/src/components/Chat/ChatList.tsx b/src/components/Chat/ChatList.tsx index a1b8862..ebc6f70 100644 --- a/src/components/Chat/ChatList.tsx +++ b/src/components/Chat/ChatList.tsx @@ -41,11 +41,9 @@ export const ChatList = ({ initialMessages, myAddress, tempMessages, chatId, onR setTimeout(() => { const hasUnreadMessages = totalMessages.some((msg) => msg.unread && !msg?.chatReference); - console.log('hasUnreadMessages', hasUnreadMessages) if (parentRef.current) { const { scrollTop, scrollHeight, clientHeight } = parentRef.current; const atBottom = scrollTop + clientHeight >= scrollHeight - 10; // Adjust threshold as needed - console.log('atBottom', atBottom, {scrollTop, scrollHeight, clientHeight}) if (!atBottom && hasUnreadMessages) { setShowScrollButton(hasUnreadMessages); } else { @@ -60,7 +58,6 @@ export const ChatList = ({ initialMessages, myAddress, tempMessages, chatId, onR }, [initialMessages, tempMessages]); const handleMessageSeen = useCallback(() => { - console.log('hello handle seen') setMessages((prevMessages) => prevMessages.map((msg) => ({ ...msg, @@ -101,7 +98,6 @@ export const ChatList = ({ initialMessages, myAddress, tempMessages, chatId, onR return messages[lastIndex]?.signature }, [messages]) - console.log('messages', messages) // Initialize the virtualizer const rowVirtualizer = useVirtualizer({ @@ -113,7 +109,6 @@ export const ChatList = ({ initialMessages, myAddress, tempMessages, chatId, onR typeof window !== 'undefined' && navigator.userAgent.indexOf('Firefox') === -1 ? element => { - console.log('height', element?.getBoundingClientRect().height) return element?.getBoundingClientRect().height } : undefined, diff --git a/src/components/Chat/MessageItem.tsx b/src/components/Chat/MessageItem.tsx index cdcac57..681130b 100644 --- a/src/components/Chat/MessageItem.tsx +++ b/src/components/Chat/MessageItem.tsx @@ -39,12 +39,10 @@ export const MessageItem = ({ useEffect(() => { if (inView && message.unread) { - console.log('seenlast') onSeen(message.id); } }, [inView, message.id, message.unread, onSeen]); - console.log('isLast', lastSignature === message?.signature) return (
{ try { - console.log('mode', mode) setIsLoading(true) const offset = isInitial ? 0 : allThreads.length; const isReverse = mode === "Newest" ? true : false; diff --git a/src/components/Group/Group.tsx b/src/components/Group/Group.tsx index 405c0ac..9206914 100644 --- a/src/components/Group/Group.tsx +++ b/src/components/Group/Group.tsx @@ -519,7 +519,6 @@ export const Group = ({ }); } catch (error) {} }; - console.log('desktopViewMode', desktopViewMode) const getGroupDataSingle = async (groupId) => { try { return new Promise((res, rej) => {