GeezerVison is showing github.com — ignore: cloud · roderik/opencode@f97fdce
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: cloud/app/src/routes/index.tsx +3-6Lines changed: 3 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,7 +7,7 @@ import IMG_SPLASH from "../asset/lander/screenshot-splash.png" |
7 | 7 | import IMG_VSCODE from "../asset/lander/screenshot-vscode.png" |
8 | 8 | import IMG_GITHUB from "../asset/lander/screenshot-github.png" |
9 | 9 | import { IconCopy, IconCheck } from "../component/icon" |
10 | | -import { A, createAsync, query } from "@solidjs/router" |
| 10 | +import { createAsync, query, redirect } from "@solidjs/router" |
11 | 11 | import { getActor, withActor } from "~/context/auth" |
12 | 12 | import { Account } from "@opencode/cloud-core/account.js" |
13 | 13 |
|
@@ -25,7 +25,7 @@ const isLoggedIn = query(async () => { |
25 | 25 | const actor = await getActor() |
26 | 26 | if (actor.type === "account") { |
27 | 27 | const workspaces = await withActor(() => Account.workspaces()) |
28 | | - return workspaces[0].id |
| 28 | + throw redirect("/" + workspaces[0].id) |
29 | 29 | } |
30 | 30 | return false |
31 | 31 | }, "isLoggedIn") |
@@ -82,10 +82,7 @@ export default function Home() { |
82 | 82 | </button> |
83 | 83 | </div> |
84 | 84 | <div data-slot="right"> |
85 | | - {workspaceId() |
86 | | - ? <A href={`/${workspaceId()}`}>Dashboard</A> |
87 | | - : <a href="/auth/authorize" target="_self">Login</a> |
88 | | - } |
| 85 | + <a href="/auth/authorize" target="_self">Login</a> |
89 | 86 | </div> |
90 | 87 | </section> |
91 | 88 |
|
|