diff --git a/components/features/home-content.tsx b/components/features/home-content.tsx index e9dac36e..ad3941aa 100644 --- a/components/features/home-content.tsx +++ b/components/features/home-content.tsx @@ -10,6 +10,7 @@ import { GitHubStarsButton } from "@/components/ui/shadcn-io/github-stars-button import { Banner } from "@/components/marketing/banner"; import { SiteFooter } from "@/components/layout/site-footer"; import { BookmarkletLink } from "@/components/marketing/bookmarklet"; +import { BookmarkBanner } from "@/components/marketing/bookmark-banner"; import { AdSpot } from "@/components/marketing/ad-spot"; import { PaperAirplaneIcon } from "@heroicons/react/24/solid"; import clsx from "clsx"; @@ -89,11 +90,12 @@ export function HomeContent() {
+

() => {}; + +function useIsMac() { + return useSyncExternalStore( + emptySubscribe, + () => navigator.platform.toLowerCase().includes("mac"), + () => true // Assume Mac on server for SSR + ); +} + +export function BookmarkBanner() { + const isMac = useIsMac(); + + return ( +
+ + Bookmark us! + + + + {isMac ? "⌘" : "Ctrl"} + + + + + D + + +
+ ); +}