@@ -4,7 +4,7 @@ import { docsUrl } from "~/lib/docs"
44import type { Translate } from "~/i18n"
55
66/** The sidebar and footer links, shared by the layout and the Markdown versions of the pages. */
7- export function siteLinks ( t : Translate , route : ( path : string ) => string ) {
7+ export function siteLinks ( t : Translate , route : ( path : string ) => string , consoleHref = route ) {
88 return {
99 // Every item the primary nav can show, in the default order (settings.ts navDefaults says which
1010 // show by default). Design mode reorders, hides and renames them (settings navConfig); the links
@@ -22,14 +22,26 @@ export function siteLinks(t: Translate, route: (path: string) => string) {
2222 {
2323 id : "console" ,
2424 label : t ( "site.nav.console" ) ,
25- href : "/console" ,
25+ href : consoleHref ( "/console" ) ,
2626 demo : route ( "/console-demo" ) ,
2727 arrow : true ,
2828 company : true ,
2929 } ,
30- { id : "models" , label : t ( "site.nav.models" ) , href : "/console/models" , arrow : true , company : true } ,
31- { id : "subscriptions" , label : t ( "site.nav.subscriptions" ) , href : "/console/go" , arrow : true , company : true } ,
32- { id : "enterprise" , label : t ( "nav.enterprise" ) , href : "/console/enterprise" , arrow : true , company : true } ,
30+ { id : "models" , label : t ( "site.nav.models" ) , href : consoleHref ( "/console/models" ) , arrow : true , company : true } ,
31+ {
32+ id : "subscriptions" ,
33+ label : t ( "site.nav.subscriptions" ) ,
34+ href : consoleHref ( "/console/go" ) ,
35+ arrow : true ,
36+ company : true ,
37+ } ,
38+ {
39+ id : "enterprise" ,
40+ label : t ( "nav.enterprise" ) ,
41+ href : consoleHref ( "/console/enterprise" ) ,
42+ arrow : true ,
43+ company : true ,
44+ } ,
3345 { id : "changelog" , label : t ( "footer.changelog" ) , href : route ( "/changelog" ) } ,
3446 // Also the GitHub mark in the top-right corner (site.tsx).
3547 { id : "github" , label : t ( "nav.github" ) , href : config . github . repoUrl , external : true , arrow : true } ,
@@ -86,10 +98,10 @@ export function siteLinks(t: Translate, route: (path: string) => string) {
8698 {
8799 title : "Anomaly" ,
88100 links : [
89- { label : t ( "site.nav.console" ) , href : "/console" } ,
90- { label : "OpenCode Models" , href : "/console/models" } ,
91- { label : t ( "site.nav.subscriptions" ) , href : "/console/go" } ,
92- { label : t ( "nav.enterprise" ) , href : "/console/enterprise" } ,
101+ { label : t ( "site.nav.console" ) , href : consoleHref ( "/console" ) } ,
102+ { label : "OpenCode Models" , href : consoleHref ( "/console/models" ) } ,
103+ { label : t ( "site.nav.subscriptions" ) , href : consoleHref ( "/console/go" ) } ,
104+ { label : t ( "nav.enterprise" ) , href : consoleHref ( "/console/enterprise" ) } ,
93105 { label : t ( "legal.privacy" ) , href : route ( "/legal/privacy-policy" ) } ,
94106 { label : t ( "legal.terms" ) , href : route ( "/legal/terms-of-service" ) } ,
95107 ] ,
0 commit comments