diff options
| author | xuatz <xzlow10@gmail.com> | 2025-05-18 17:21:11 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-18 09:21:11 +0100 |
| commit | dbd0fd197323f2a83fab384d7b4b116a02165d16 (patch) | |
| tree | 2bd3c34bd7088b32ae7f0e33910d54b73a620366 /apps/web/app/dashboard | |
| parent | f338f7b102e538889e4f16fac407f4d5f17fdf69 (diff) | |
| download | karakeep-dbd0fd197323f2a83fab384d7b4b116a02165d16.tar.zst | |
fix(search): add new relevance sort order (#1392)
* fix(search): add new relevance sort order
* address pr comments
* some minor fixes
---------
Co-authored-by: Mohamed Bassem <me@mbassem.com>
Diffstat (limited to 'apps/web/app/dashboard')
| -rw-r--r-- | apps/web/app/dashboard/search/page.tsx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/web/app/dashboard/search/page.tsx b/apps/web/app/dashboard/search/page.tsx index beae73b8..c3542a88 100644 --- a/apps/web/app/dashboard/search/page.tsx +++ b/apps/web/app/dashboard/search/page.tsx @@ -1,14 +1,22 @@ "use client"; -import { Suspense } from "react"; +import { Suspense, useEffect } from "react"; import BookmarksGrid from "@/components/dashboard/bookmarks/BookmarksGrid"; import { FullPageSpinner } from "@/components/ui/full-page-spinner"; import { useBookmarkSearch } from "@/lib/hooks/bookmark-search"; +import { useSortOrderStore } from "@/lib/store/useSortOrderStore"; function SearchComp() { const { data, hasNextPage, fetchNextPage, isFetchingNextPage } = useBookmarkSearch(); + const { setSortOrder } = useSortOrderStore(); + + useEffect(() => { + // also see related cleanup code in SortOrderToggle.tsx + setSortOrder("relevance"); + }, []); + return ( <div className="flex flex-col gap-3"> {data ? ( |
