We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2aa8090 commit c080346Copy full SHA for c080346
1 file changed
apps/website/app/components/Logo.tsx
@@ -5,10 +5,17 @@ import Image from "next/image";
5
import { usePathname } from "next/navigation";
6
import { PlatformBadge } from "./PlatformBadge";
7
8
+const DOCS_PLATFORMS = {
9
+ "/docs/obsidian/": "obsidian",
10
+ "/docs/roam/": "roam",
11
+} as const;
12
+
13
export const Logo = () => {
14
const pathname = usePathname();
15
- const platform = pathname.includes("/docs/obsidian/") ? "obsidian" : "roam";
16
+ const platform = Object.entries(DOCS_PLATFORMS).find(([path]) =>
17
+ pathname.includes(path),
18
+ )?.[1];
19
20
return (
21
<div className="flex items-center space-x-2">
0 commit comments