fix link unreachable error not handled properly
This commit is contained in:
@@ -35,9 +35,12 @@ function BookmarkListPane() {
|
||||
}
|
||||
|
||||
function BookmarkListContainer() {
|
||||
const { data: bookmarks, status } = useAuthenticatedQuery(["bookmarks"], () =>
|
||||
fetchApi("/bookmarks").then((res) => res.json()),
|
||||
)
|
||||
const searchParams = Route.useSearch()
|
||||
const { data: bookmarks, status } = useAuthenticatedQuery(["bookmarks"], () => {
|
||||
const params = new URLSearchParams(searchParams)
|
||||
console.log("params", params)
|
||||
return fetchApi(params.size > 0 ? `/bookmarks?${params.toString()}` : "/bookmarks").then((res) => res.json())
|
||||
})
|
||||
const handleBookmarkListItemAction = useBookmarkPageStore((state) => state.handleBookmarkListItemAction)
|
||||
|
||||
switch (status) {
|
||||
|
Reference in New Issue
Block a user