Skip to content

Commit c080346

Browse files
authored
[ENG-627] Docs tag is added to homepage (#302)
* fix bug * clean
1 parent 2aa8090 commit c080346

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

apps/website/app/components/Logo.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,17 @@ import Image from "next/image";
55
import { usePathname } from "next/navigation";
66
import { PlatformBadge } from "./PlatformBadge";
77

8+
const DOCS_PLATFORMS = {
9+
"/docs/obsidian/": "obsidian",
10+
"/docs/roam/": "roam",
11+
} as const;
12+
813
export const Logo = () => {
914
const pathname = usePathname();
1015

11-
const platform = pathname.includes("/docs/obsidian/") ? "obsidian" : "roam";
16+
const platform = Object.entries(DOCS_PLATFORMS).find(([path]) =>
17+
pathname.includes(path),
18+
)?.[1];
1219

1320
return (
1421
<div className="flex items-center space-x-2">

0 commit comments

Comments
 (0)