From e8f54b9b382616b0d6d082662bdedeb54a28b3cb Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Wed, 3 Sep 2025 14:24:21 -0400 Subject: [PATCH] wip: fix logout --- cloud/app/src/entry-server.tsx | 1 + cloud/app/src/routes/index.tsx | 2 -- cloud/app/src/routes/workspace.tsx | 4 +++- cloud/app/src/routes/workspace/[id].tsx | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cloud/app/src/entry-server.tsx b/cloud/app/src/entry-server.tsx index 41fc8fc8..d2e6044a 100644 --- a/cloud/app/src/entry-server.tsx +++ b/cloud/app/src/entry-server.tsx @@ -1,6 +1,7 @@ // @refresh reload import { createHandler, StartServer } from "@solidjs/start/server" + export default createHandler(() => ( ( diff --git a/cloud/app/src/routes/index.tsx b/cloud/app/src/routes/index.tsx index bd2f8d1f..fd6bc23f 100644 --- a/cloud/app/src/routes/index.tsx +++ b/cloud/app/src/routes/index.tsx @@ -1,6 +1,4 @@ import "./index.css" -import "./workspace.css" -import "./workspace/[id].css" import { Title } from "@solidjs/meta" import { Match, onCleanup, onMount, Switch } from "solid-js" import logoLight from "../asset/logo-ornate-light.svg" diff --git a/cloud/app/src/routes/workspace.tsx b/cloud/app/src/routes/workspace.tsx index b97e2160..e3f70cab 100644 --- a/cloud/app/src/routes/workspace.tsx +++ b/cloud/app/src/routes/workspace.tsx @@ -1,3 +1,4 @@ +import "./workspace.css" import { useAuthSession } from "~/context/auth.session" import { IconLogo } from "../component/icon" import { withActor } from "~/context/auth.withActor" @@ -28,6 +29,7 @@ const logout = action(async () => { event!.locals.actor = undefined return val }) + throw redirect("/") }) export default function WorkspaceLayout(props: RouteSectionProps) { @@ -43,7 +45,7 @@ export default function WorkspaceLayout(props: RouteSectionProps) {
{userInfo()?.user.email} -
(location.href = "/")} action={logout} method="post"> + diff --git a/cloud/app/src/routes/workspace/[id].tsx b/cloud/app/src/routes/workspace/[id].tsx index d4a3500e..2e3f526c 100644 --- a/cloud/app/src/routes/workspace/[id].tsx +++ b/cloud/app/src/routes/workspace/[id].tsx @@ -1,3 +1,4 @@ +import "./[id].css" import { Billing } from "@opencode/cloud-core/billing.js" import { Key } from "@opencode/cloud-core/key.js" import { action, createAsync, query, useAction, useSubmission, json, useParams } from "@solidjs/router"