diff options
Diffstat (limited to 'cloud/app/src/routes')
| -rw-r--r-- | cloud/app/src/routes/index.tsx | 3 | ||||
| -rw-r--r-- | cloud/app/src/routes/workspace/[workspaceID].tsx (renamed from cloud/app/src/routes/[workspaceID].tsx) | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/cloud/app/src/routes/index.tsx b/cloud/app/src/routes/index.tsx index 7f8433e7e..7a43f2624 100644 --- a/cloud/app/src/routes/index.tsx +++ b/cloud/app/src/routes/index.tsx @@ -23,9 +23,10 @@ function CopyStatus() { const isLoggedIn = query(async () => { "use server" const actor = await getActor() + console.log(actor) if (actor.type === "account") { const workspaces = await withActor(() => Account.workspaces()) - throw redirect("/" + workspaces[0].id) + throw redirect(`/workspace/${workspaces[0].id}`) } return false }, "isLoggedIn") diff --git a/cloud/app/src/routes/[workspaceID].tsx b/cloud/app/src/routes/workspace/[workspaceID].tsx index 1afcc979e..00e61a0c7 100644 --- a/cloud/app/src/routes/[workspaceID].tsx +++ b/cloud/app/src/routes/workspace/[workspaceID].tsx @@ -42,11 +42,12 @@ const createCheckoutUrl = action(async (successUrl: string, cancelUrl: string) = return withActor(() => Billing.generateCheckoutUrl({ successUrl, cancelUrl })) }, "checkoutUrl") -//export const route = { -// preload: () => listKeys(), -//} +const createPortalUrl = action(async (returnUrl: string) => { + "use server" + return withActor(() => Billing.generatePortalUrl({ returnUrl })) +}, "portalUrl") -export default function () { +export default function() { const actor = createAsync(() => getActor()) ///////////////// |
