diff --git a/src/components/shell/ShellIsland.tsx b/src/components/shell/ShellIsland.tsx index 39c4eed..1ab26e4 100644 --- a/src/components/shell/ShellIsland.tsx +++ b/src/components/shell/ShellIsland.tsx @@ -4,6 +4,7 @@ import { ThemeToggle } from './ThemeToggle'; import { CommandPalette } from './CommandPalette'; import { Modal } from '@/components/ui/Modal'; import { initTheme } from '@/stores/theme.store'; +import { isTauri } from '@/services/platform'; import { REPO_URL } from '@/config'; /** Opens the command palette from a click (works without a keyboard). */ @@ -17,10 +18,15 @@ const iconBtn = export function ShellIsland() { const [modal, setModal] = useState(null); const [isMac, setIsMac] = useState(true); + // Settings only apply to the desktop app; hide the nav link on the web. + // Starts false so SSR and the first client render match, then reveals on + // desktop after mount (avoids a hydration mismatch). + const [isDesktop, setIsDesktop] = useState(false); useEffect(() => { initTheme(); setIsMac(/Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent)); + setIsDesktop(isTauri()); }, []); const bookmarkKey = isMac ? '⌘ D' : 'Ctrl + D'; @@ -48,9 +54,11 @@ export function ShellIsland() { ⌘K to search - - - + {isDesktop && ( + + + + )}