From b86dad6d44a9b22d85c077742a40d71af1a6a606 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 16 Aug 2024 23:19:19 +0700 Subject: [PATCH] chore: remove repeated console log that could slow down the fe on state update --- web/containers/ListContainer/index.tsx | 2 -- web/hooks/useRecommendedModel.ts | 4 ---- 2 files changed, 6 deletions(-) diff --git a/web/containers/ListContainer/index.tsx b/web/containers/ListContainer/index.tsx index 99d2e99e6..a48db5313 100644 --- a/web/containers/ListContainer/index.tsx +++ b/web/containers/ListContainer/index.tsx @@ -15,7 +15,6 @@ const ListContainer = ({ children }: Props) => { const currentScrollTop = event.currentTarget.scrollTop if (prevScrollTop.current > currentScrollTop) { - console.debug('User is manually scrolling up') isUserManuallyScrollingUp.current = true } else { const currentScrollTop = event.currentTarget.scrollTop @@ -23,7 +22,6 @@ const ListContainer = ({ children }: Props) => { const clientHeight = event.currentTarget.clientHeight if (currentScrollTop + clientHeight >= scrollHeight) { - console.debug('Scrolled to the bottom') isUserManuallyScrollingUp.current = false } } diff --git a/web/hooks/useRecommendedModel.ts b/web/hooks/useRecommendedModel.ts index 8122e2b77..8474aa3c5 100644 --- a/web/hooks/useRecommendedModel.ts +++ b/web/hooks/useRecommendedModel.ts @@ -72,9 +72,6 @@ export default function useRecommendedModel() { // if we don't have [lastUsedModelId], then we can just use the first model // in the downloaded list if (!lastUsedModelId) { - console.debug( - `No last used model, using first model in list ${models[0].id}}` - ) setRecommendedModel(models[0]) return } @@ -90,7 +87,6 @@ export default function useRecommendedModel() { return } - console.debug(`Using last used model ${lastUsedModel.id}`) setRecommendedModel(lastUsedModel) // eslint-disable-next-line react-hooks/exhaustive-deps }, [getAndSortDownloadedModels, activeThread])