summaryrefslogtreecommitdiffhomepage
path: root/cloud/app/src
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-09-01 11:53:43 -0400
committerDax Raad <[email protected]>2025-09-01 11:53:43 -0400
commit38f9ce05f6067290fdba9ecbc5a66ae956d47780 (patch)
tree4b2f4272112904cef5b8ae68aa09c185b95b35ac /cloud/app/src
parenta6e09363b8ad628e1f4fd230994a40fef3aa63d5 (diff)
downloadopencode-38f9ce05f6067290fdba9ecbc5a66ae956d47780.tar.gz
opencode-38f9ce05f6067290fdba9ecbc5a66ae956d47780.zip
wip: cloud
Diffstat (limited to 'cloud/app/src')
-rw-r--r--cloud/app/src/entry-server.tsx2
-rw-r--r--cloud/app/src/routes/workspace/[id].tsx19
2 files changed, 7 insertions, 14 deletions
diff --git a/cloud/app/src/entry-server.tsx b/cloud/app/src/entry-server.tsx
index 41fc8fc8b..f626e8e9d 100644
--- a/cloud/app/src/entry-server.tsx
+++ b/cloud/app/src/entry-server.tsx
@@ -21,5 +21,5 @@ export default createHandler(() => (
)}
/>
), {
- mode: "async",
+ mode: "sync",
})
diff --git a/cloud/app/src/routes/workspace/[id].tsx b/cloud/app/src/routes/workspace/[id].tsx
index 2284f1c36..c4c18bc66 100644
--- a/cloud/app/src/routes/workspace/[id].tsx
+++ b/cloud/app/src/routes/workspace/[id].tsx
@@ -42,20 +42,13 @@ const removeKey = action(async (id: string) => {
const getBillingInfo = query(async () => {
"use server"
return withActor(async () => {
- const now = Date.now()
- console.log("getting actor")
const actor = Actor.assert("user")
- console.log("getting user")
- const user = await User.fromID(actor.properties.userID)
- console.log("getting billing")
- const billing = await Billing.get()
- console.log("getting payments")
- const payments = await Billing.payments()
- console.log("getting usage")
- const usage = await Billing.usages()
- console.log("getBillingInfo", {
- duration: Date.now() - now,
- })
+ const [user, billing, payments, usage] = await Promise.all([
+ User.fromID(actor.properties.userID),
+ Billing.get(),
+ Billing.payments(),
+ Billing.usages(),
+ ])
return { user, billing, payments, usage }
})
}, "billingInfo")