From 9f0d43fe099a95ab1516ae951dcb60a89e76a5a5 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 3 Nov 2023 21:13:33 +0800 Subject: chore: delete useless codes --- docs/components/SiteSwitcher.tsx | 66 ---------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 docs/components/SiteSwitcher.tsx (limited to 'docs/components/SiteSwitcher.tsx') diff --git a/docs/components/SiteSwitcher.tsx b/docs/components/SiteSwitcher.tsx deleted file mode 100644 index 6f6ba15..0000000 --- a/docs/components/SiteSwitcher.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import cn from "classnames"; -import { useRouter } from "next/router"; -import Link from "next/link"; - -export type TurboSite = "TRPG" | "AI"; - -export function useTurboSite(): TurboSite | undefined { - const { pathname } = useRouter(); - - if (pathname.startsWith("/AI")) { - return "AI"; - } - - if (pathname.startsWith("/TRPG")) { - return "TRPG"; - } - - return undefined; -} - -function SiteSwitcherLink({ href, text, isActive }) { - const classes = - "py-1 transition-colors duration-300 inline-block w-[50px] cursor-pointer hover:text-black dark:hover:text-white"; - - const conditionalClasses = { - "text-black dark:text-white": !!isActive, - }; - - return ( - - {text} - - ); -} - -function SiteSwitcher() { - const site = useTurboSite(); - - return ( -
- - - - - - -
- ); -} - -export default SiteSwitcher; -- cgit v1.2.3-70-g09d2