diff options
| author | Frank <[email protected]> | 2026-03-04 22:23:22 -0500 |
|---|---|---|
| committer | Frank <[email protected]> | 2026-03-04 22:23:22 -0500 |
| commit | 85ff05670a53079066fcbc0abc0271ea355585c1 (patch) | |
| tree | 20d598de0a26607b2e7fba96209b9f0dc179fd39 | |
| parent | 324230806e99d4e5c9cc14fd66ddad0ba0c2b6e6 (diff) | |
| download | opencode-85ff05670a53079066fcbc0abc0271ea355585c1.tar.gz opencode-85ff05670a53079066fcbc0abc0271ea355585c1.zip | |
zen: update go page
| -rw-r--r-- | packages/console/app/src/routes/go/index.tsx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/console/app/src/routes/go/index.tsx b/packages/console/app/src/routes/go/index.tsx index af4a1d8c4..842256ca3 100644 --- a/packages/console/app/src/routes/go/index.tsx +++ b/packages/console/app/src/routes/go/index.tsx @@ -1,7 +1,7 @@ import "./index.css" import { createAsync, query, redirect } from "@solidjs/router" import { Title, Meta } from "@solidjs/meta" -import { For, createSignal, onCleanup, onMount } from "solid-js" +import { For, createMemo, createSignal, onCleanup, onMount } from "solid-js" //import { HttpHeader } from "@solidjs/start" import goLogoLight from "../../asset/go-ornate-light.svg" import goLogoDark from "../../asset/go-ornate-dark.svg" @@ -19,8 +19,7 @@ import { LocaleLinks } from "~/component/locale-links" const checkLoggedIn = query(async () => { "use server" - const workspaceID = await getLastSeenWorkspaceID().catch(() => {}) - if (workspaceID) throw redirect(`/workspace/${workspaceID}`) + return await getLastSeenWorkspaceID().catch(() => undefined) }, "checkLoggedIn.get") function LimitsGraph(props: { href: string }) { @@ -205,7 +204,8 @@ function LimitsGraph(props: { href: string }) { } export default function Home() { - const loggedin = createAsync(() => checkLoggedIn()) + const workspaceID = createAsync(() => checkLoggedIn()) + const subscribeUrl = createMemo(() => (workspaceID() ? `/workspace/${workspaceID()}/billing` : "/auth")) const i18n = useI18n() const language = useLanguage() return ( @@ -223,7 +223,7 @@ export default function Home() { <Meta name="twitter:title" content={i18n.t("go.title")} /> <Meta name="twitter:description" content={i18n.t("go.meta.description")} /> <Meta name="twitter:image" content="/social-share-black.png" /> - <Meta name="opencode:auth" content={loggedin() ? "true" : "false"} /> + <Meta name="opencode:auth" content={workspaceID() ? "true" : "false"} /> <div data-component="container"> <Header go hideGetStarted /> @@ -310,7 +310,7 @@ export default function Home() { </div> */} </div> - <a href="/auth"> + <a href={subscribeUrl()}> <span> <For each={i18n @@ -420,7 +420,7 @@ export default function Home() { {i18n.t("go.faq.a4.p1.beforePricing")}{" "} <a href={language.route("/docs/go/#pricing")}>{i18n.t("go.faq.a4.p1.pricingLink")}</a>{" "} {i18n.t("go.faq.a4.p1.afterPricing")} {i18n.t("go.faq.a4.p2.beforeAccount")}{" "} - <a href="/auth">{i18n.t("go.faq.a4.p2.accountLink")}</a>. {i18n.t("go.faq.a4.p3")} + <a href={subscribeUrl()}>{i18n.t("go.faq.a4.p2.accountLink")}</a>. {i18n.t("go.faq.a4.p3")} </Faq> </li> <li> |
