Dax Raad 5 месяцев назад
Родитель
Сommit
e8f54b9b38

+ 1 - 0
cloud/app/src/entry-server.tsx

@@ -1,6 +1,7 @@
 // @refresh reload
 import { createHandler, StartServer } from "@solidjs/start/server"
 
+
 export default createHandler(() => (
   <StartServer
     document={({ assets, children, scripts }) => (

+ 0 - 2
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"

+ 3 - 1
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) {
         </div>
         <div data-slot="header-actions">
           <span>{userInfo()?.user.email}</span>
-          <form onSubmit={() => (location.href = "/")} action={logout} method="post">
+          <form action={logout} method="post">
             <button type="submit" formaction={logout}>
               Logout
             </button>

+ 1 - 0
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"