diff options
| author | 2023-11-03 21:13:33 +0800 | |
|---|---|---|
| committer | 2023-11-03 21:13:33 +0800 | |
| commit | 9f0d43fe099a95ab1516ae951dcb60a89e76a5a5 (patch) | |
| tree | 51614fe47bff8bb11028a07d4a35c34c9ff6594a /docs/components/Navigation.tsx | |
| parent | 8f135707d069c900e055dae71e69909d6b9a41bb (diff) | |
| download | HydroRoll-9f0d43fe099a95ab1516ae951dcb60a89e76a5a5.tar.gz HydroRoll-9f0d43fe099a95ab1516ae951dcb60a89e76a5a5.zip | |
chore: delete useless codes
Diffstat (limited to 'docs/components/Navigation.tsx')
| -rw-r--r-- | docs/components/Navigation.tsx | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/docs/components/Navigation.tsx b/docs/components/Navigation.tsx deleted file mode 100644 index b446d4c..0000000 --- a/docs/components/Navigation.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { Navbar } from "nextra-theme-docs"; -import { useTurboSite } from "./SiteSwitcher"; - -function Navigation(props) { - const site = useTurboSite(); - - /* - Inject a dynamic docs link when NOT on root - 1. Points to /repo/docs when on /repo - 2. Points to /pack/docs when on /pack - */ - const leadingItem = props.items[0]; - if (leadingItem?.id !== "contextual-docs" && site) { - props.items.unshift({ - title: "Docs", - type: "page", - route: `/${site}/docs`, - id: "contextual-docs", - key: "contextual-docs", - }); - } - - const lastItem = props.items[props.items.length - 1]; - if (lastItem?.id !== "contextual-enterprise") { - props.items.push({ - title: "Enterprise", - newWindow: true, - // https://github.com/shuding/nextra/issues/1028 - route: "enterprise", - href: `https://vercel.com/${ - site === "AI" ? "solutions/HydroRollAI" : "contact/sales" - }?utm_source=turbo.build&utm_medium=referral&utm_campaign=header-enterpriseLink`, - id: "contextual-enterprise", - key: "contextual-enterprise", - }); - } - - // remove the top level repo and pack links - const headerItems = props.items.filter((item) => { - return item.name !== "AI" && item.name !== "TRPG"; - }); - - // items last to override the default - return <Navbar {...props} items={headerItems} />; -} - -export default Navigation; |
