diff --git a/web/components/supabase-search.tsx b/web/components/supabase-search.tsx index dd6ccfc34a..ddcf3967e2 100644 --- a/web/components/supabase-search.tsx +++ b/web/components/supabase-search.tsx @@ -730,7 +730,7 @@ const useSearchQueryState = (props: { const [lastSort, setLastSort, localStateReady] = usePersistentLocalState( defaultSort ?? 'score', - `${persistPrefix}-last-search-sort` + `${persistPrefix}-last-search-sort-2` ) const defaults = { @@ -749,9 +749,9 @@ const useSearchQueryState = (props: { useEffect(() => { if (localStateReady) setLastSort(state.s) - }, [state.s, ready]) + }, [state.s, localStateReady]) - return [state, setState, localStateReady] as const + return [state, setState, ready] as const } const useShim = >( diff --git a/web/pages/browse/[[...slug]].tsx b/web/pages/browse/[[...slug]].tsx index 62f34eb1a1..17365986fb 100644 --- a/web/pages/browse/[[...slug]].tsx +++ b/web/pages/browse/[[...slug]].tsx @@ -208,7 +208,7 @@ export function GroupPageContent(props: { setTopics={setTopicResults} topicSlug={topicSlug} defaultFilter="open" - defaultSort="score" + defaultSort="freshness-score" defaultForYou="1" shownTopics={shownTopics} setTopicSlug={(slug) => {