diff options
| author | Jay V <[email protected]> | 2025-08-28 16:29:21 -0400 |
|---|---|---|
| committer | Jay V <[email protected]> | 2025-08-28 16:29:21 -0400 |
| commit | f97fdceb01c69ca563e755c6d50312ef7352f663 (patch) | |
| tree | bb746432ca216b8caba600bc6c8163de13decce2 /cloud/app/src | |
| parent | 3f225e3248c54b4f17a0e1067d64614814020ccc (diff) | |
| download | opencode-f97fdceb01c69ca563e755c6d50312ef7352f663.tar.gz opencode-f97fdceb01c69ca563e755c6d50312ef7352f663.zip | |
ignore: cloud
Diffstat (limited to 'cloud/app/src')
| -rw-r--r-- | cloud/app/src/routes/index.tsx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/cloud/app/src/routes/index.tsx b/cloud/app/src/routes/index.tsx index 2b7678d0b..7f8433e7e 100644 --- a/cloud/app/src/routes/index.tsx +++ b/cloud/app/src/routes/index.tsx @@ -7,7 +7,7 @@ import IMG_SPLASH from "../asset/lander/screenshot-splash.png" import IMG_VSCODE from "../asset/lander/screenshot-vscode.png" import IMG_GITHUB from "../asset/lander/screenshot-github.png" import { IconCopy, IconCheck } from "../component/icon" -import { A, createAsync, query } from "@solidjs/router" +import { createAsync, query, redirect } from "@solidjs/router" import { getActor, withActor } from "~/context/auth" import { Account } from "@opencode/cloud-core/account.js" @@ -25,7 +25,7 @@ const isLoggedIn = query(async () => { const actor = await getActor() if (actor.type === "account") { const workspaces = await withActor(() => Account.workspaces()) - return workspaces[0].id + throw redirect("/" + workspaces[0].id) } return false }, "isLoggedIn") @@ -82,10 +82,7 @@ export default function Home() { </button> </div> <div data-slot="right"> - {workspaceId() - ? <A href={`/${workspaceId()}`}>Dashboard</A> - : <a href="/auth/authorize" target="_self">Login</a> - } + <a href="/auth/authorize" target="_self">Login</a> </div> </section> |
