Skip to content

Commit 174200d

Browse files
authored
fix(console): restore Enterprise link in site header (#62149)
1 parent f7cf3a1 commit 174200d

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

‎packages/console/app/src/component/header.tsx‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,11 @@ export function Header() {
179179
{i18n.t("nav.subscription")}
180180
</a>
181181
</li>
182+
<li>
183+
<a href="/console/enterprise" target="_self">
184+
{i18n.t("nav.enterprise")}
185+
</a>
186+
</li>
182187
<li>
183188
<a href="/console" target="_self">
184189
{i18n.t("nav.console")}
@@ -281,6 +286,11 @@ export function Header() {
281286
{i18n.t("nav.subscription")}
282287
</a>
283288
</li>
289+
<li>
290+
<a href="/console/enterprise" target="_self">
291+
{i18n.t("nav.enterprise")}
292+
</a>
293+
</li>
284294
<li>
285295
<a href="/console" target="_self">
286296
{i18n.t("nav.console")}

‎packages/console/app/src/middleware.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default createMiddleware({
4545
headers: { Location: "https://opencode.ai/console/login", "Cache-Control": "no-store" },
4646
})
4747

48-
// The Go, Zen, pricing, models and teams pages moved to the Console. Match the exact paths only: /zen/v1/* and
48+
// The Go, Zen, pricing, models, teams and enterprise pages moved to the Console. Match the exact paths only: /zen/v1/* and
4949
// /zen/go/v1/* are the inference API, so a prefix match here would break API clients if the inference routes ever
5050
// stopped catching them.
5151
const moved = new Map([
@@ -55,6 +55,7 @@ export default createMiddleware({
5555
["/pricing", "/console/go"],
5656
["/models", "/console/models"],
5757
["/teams", "/console/teams"],
58+
["/enterprise", "/console/enterprise"],
5859
]).get(url.pathname.replace(/(.)\/$/, "$1"))
5960
if (moved && !locale && (event.request.method === "GET" || event.request.method === "HEAD"))
6061
return new Response(null, {

0 commit comments

Comments
 (0)