A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
fix: Remove flicker from search bar
MohamedBassem3304ed4733f7
diff --git a/apps/web/app/dashboard/search/page.tsx b/apps/web/app/dashboard/search/page.tsxindex 62d42a43..76d23af2 100644--- a/apps/web/app/dashboard/search/page.tsx+++ b/apps/web/app/dashboard/search/page.tsx@@ -8,18 +8,14 @@ import { useBookmarkSearch } from "@/lib/hooks/bookmark-search";import Loading from "../bookmarks/loading";function SearchComp() {- const { data, isPending, isPlaceholderData } = useBookmarkSearch();+ const { data } = useBookmarkSearch();const inputRef: React.MutableRefObject<HTMLInputElement | null> =useRef<HTMLInputElement | null>(null);return (<div className="container flex flex-col gap-3 p-4">- <SearchInput- ref={inputRef}- autoFocus={true}- loading={isPending || isPlaceholderData}- />+ <SearchInput ref={inputRef} autoFocus={true} /><hr />{data ? (<BookmarksGriddiff --git a/apps/web/components/dashboard/search/SearchInput.tsx b/apps/web/components/dashboard/search/SearchInput.tsxindex 1ca6a0ae..0dd86c50 100644--- a/apps/web/components/dashboard/search/SearchInput.tsx+++ b/apps/web/components/dashboard/search/SearchInput.tsx@@ -3,12 +3,11 @@import React from "react";import { Input } from "@/components/ui/input";import { useDoBookmarkSearch } from "@/lib/hooks/bookmark-search";-import { cn } from "@/lib/utils";const SearchInput = React.forwardRef<HTMLInputElement,React.HTMLAttributes<HTMLInputElement> & { loading?: boolean }->(({ className, loading = false, ...props }, ref) => {+>(({ className, ...props }, ref) => {const { debounceSearch, searchQuery } = useDoBookmarkSearch();return (@@ -17,7 +16,7 @@ const SearchInput = React.forwardRef<placeholder="Search"defaultValue={searchQuery}onChange={(e) => debounceSearch(e.target.value)}- className={cn(loading ? "animate-pulse-border" : undefined, className)}+ className={className}{...props}/>);