diff --git a/apps/web/src/components/placeholders/index.tsx b/apps/web/src/components/placeholders/index.tsx index fabf4d7bd..54b808d4a 100644 --- a/apps/web/src/components/placeholders/index.tsx +++ b/apps/web/src/components/placeholders/index.tsx @@ -19,7 +19,7 @@ along with this program. If not, see . import { Button, Flex, Text } from "@theme-ui/components"; import { TipContext, useTip } from "../../hooks/use-tip"; -import { Info, Sync } from "../icons"; +import { Error, Info, Sync } from "../icons"; import { useStore as useAppStore } from "../../stores/app-store"; import { strings } from "@notesnook/intl"; @@ -78,19 +78,23 @@ function Placeholder(props: PlaceholderProps) { px: 6 }} > - - - - {strings.tip()} - - + {tip.type === "error" ? ( + + ) : ( + + + + {strings.tip()} + + + )} {text || tip.text} diff --git a/apps/web/src/hooks/use-tip.ts b/apps/web/src/hooks/use-tip.ts index afdde21d5..49c08d91f 100644 --- a/apps/web/src/hooks/use-tip.ts +++ b/apps/web/src/hooks/use-tip.ts @@ -55,6 +55,7 @@ export type Tip = { text: string; contexts: TipContext[]; button?: TipButton; + type?: "info" | "warning" | "error"; }; const destructiveContexts: string[] = []; @@ -110,8 +111,9 @@ export const useTip = ( const tips: Tip[] = [ { - text: `Wrap a query in double quotes to search for an exact match.`, - contexts: ["search"] + text: `No results found. Try searching with different keywords or check your spelling.`, + contexts: ["search"], + type: "error" }, { text: "Hold Ctrl/Cmd & click on multiple items to select them.",