Skip to content

Commit

Permalink
Default fresh
Browse files Browse the repository at this point in the history
  • Loading branch information
jahooma committed Jun 25, 2024
1 parent 39e0937 commit 89aa947
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions web/components/supabase-search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ const useSearchQueryState = (props: {
const [lastSort, setLastSort, localStateReady] =
usePersistentLocalState<Sort>(
defaultSort ?? 'score',
`${persistPrefix}-last-search-sort`
`${persistPrefix}-last-search-sort-2`
)

const defaults = {
Expand All @@ -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 = <T extends Record<string, string | undefined>>(
Expand Down
2 changes: 1 addition & 1 deletion web/pages/browse/[[...slug]].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 89aa947

Please sign in to comment.