add sonner + project creation working

This commit is contained in:
Ishaan Dey
2024-04-27 16:22:35 -04:00
parent 676f88a7ce
commit d941e2c056
18 changed files with 427 additions and 75 deletions

View File

@ -3,13 +3,16 @@
export async function createSandbox(body: {
type: string
name: string
userId: string
visibility: string
}) {
const res = await fetch("http://localhost:8787/api/sandbox/create", {
method: "POST",
const res = await fetch("http://localhost:8787/api/sandbox", {
method: "PUT",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(body),
})
return await res.text()
}

View File

@ -11,6 +11,7 @@ export type Sandbox = {
id: string
name: string
type: "react" | "node"
visibility: "public" | "private"
userId: string
}