summaryrefslogtreecommitdiffhomepage
path: root/cloud/app/src/routes
diff options
context:
space:
mode:
authorFrank <[email protected]>2025-09-03 06:37:40 -0400
committerFrank <[email protected]>2025-09-03 06:37:40 -0400
commit93f2805bc2737cd6f69d2f077e7814f63e9250cf (patch)
treecaa2a8c3dec056a2c9e102b6a7be1716e7009edc /cloud/app/src/routes
parent9ad4dc92966f36b9e3d52857f788ccac7c5d003a (diff)
downloadopencode-93f2805bc2737cd6f69d2f077e7814f63e9250cf.tar.gz
opencode-93f2805bc2737cd6f69d2f077e7814f63e9250cf.zip
wip: console
Diffstat (limited to 'cloud/app/src/routes')
-rw-r--r--cloud/app/src/routes/index.tsx2
-rw-r--r--cloud/app/src/routes/workspace.tsx10
2 files changed, 6 insertions, 6 deletions
diff --git a/cloud/app/src/routes/index.tsx b/cloud/app/src/routes/index.tsx
index f9c0dc976..29f417e5a 100644
--- a/cloud/app/src/routes/index.tsx
+++ b/cloud/app/src/routes/index.tsx
@@ -24,8 +24,6 @@ function CopyStatus() {
const isLoggedIn = query(async () => {
"use server"
const actor = await getActor()
- // TODO
- console.log(actor)
if (actor.type === "account") {
const workspaces = await withActor(() => Account.workspaces())
return workspaces[0].id
diff --git a/cloud/app/src/routes/workspace.tsx b/cloud/app/src/routes/workspace.tsx
index 5149954fa..853cb3707 100644
--- a/cloud/app/src/routes/workspace.tsx
+++ b/cloud/app/src/routes/workspace.tsx
@@ -22,8 +22,8 @@ const logout = action(async () => {
const current = auth.data.current
if (current)
await auth.update((val) => {
- delete val.account[current]
- const first = Object.keys(val.account)[0]
+ delete val.account?.[current]
+ const first = Object.keys(val.account ?? {})[0]
val.current = first
return val
})
@@ -43,8 +43,10 @@ export default function WorkspaceLayout(props: RouteSectionProps) {
</div>
<div data-slot="header-actions">
<span>{userInfo()?.user.email}</span>
- <form onSubmit={() => location.href = "/"} action={logout} method="post">
- <button type="submit" formaction={logout}>Logout</button>
+ <form onSubmit={() => (location.href = "/")} action={logout} method="post">
+ <button type="submit" formaction={logout}>
+ Logout
+ </button>
</form>
</div>
</header>