Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

update progress

ErikKaumk962ee165a942
diff --git a/apps/docs/package.json b/apps/docs/package.json
index 9662893e4..ca3e982d0 100644
--- a/apps/docs/package.json
+++ b/apps/docs/package.json
@@ -66,6 +66,7 @@
"tailwindcss": "^3.3.3",
"tailwindcss-animate": "^1.0.7",
"typescript": "5.1.6",
+ "unique-names-generator": "^4.7.1",
"unist-util-filter": "^4.0.1",
"unist-util-visit": "^4.1.1",
"usehooks-ts": "^2.9.1",
diff --git a/apps/docs/src/app/(main)/api/create-api-key/route.ts b/apps/docs/src/app/(main)/api/create-api-key/route.ts
index 8e28aefd0..66aaae8d5 100644
--- a/apps/docs/src/app/(main)/api/create-api-key/route.ts
+++ b/apps/docs/src/app/(main)/api/create-api-key/route.ts
@@ -16,6 +16,7 @@ const generateApiKey = (): string => {
return apiKey
}
+// TODO this needs some auth
export async function POST(request: Request) {
const { teamId } = await request.json()
@@ -30,14 +31,12 @@ export async function POST(request: Request) {
.from('team_api_keys')
.insert(newKey)
-
if (error) {
// TODO: Add sentry event here
console.log(error)
return new Response('Failed creating new api key', { status: 503 })
}
-
return new Response(JSON.stringify({ api_key: newKey.api_key, createdAt: newKey.created_at }), { status: 200 })
}
diff --git a/apps/docs/src/app/(main)/api/create-new-team/route.ts b/apps/docs/src/app/(main)/api/create-new-team/route.ts
new file mode 100644
index 000000000..36640073c
--- /dev/null
+++ b/apps/docs/src/app/(main)/api/create-new-team/route.ts
@@ -0,0 +1,67 @@
+export const dynamic = 'force-dynamic' // static by default, unless reading the request
+export const runtime = 'nodejs'
+
+import { Team } from '@/utils/useUser'
+import { createClient } from '@supabase/supabase-js'
+import { uniqueNamesGenerator, Config, adjectives, colors } from 'unique-names-generator'
+
+const supabase = createClient(
+ process.env.NEXT_PUBLIC_SUPABASE_URL!,
+ process.env.SUPABASE_SERVICE_ROLE_KEY!,
+)
+
+const customConfig: Config = {
+ dictionaries: [adjectives, colors],
+ separator: '-',
+ length: 2,
+}
+
+// TODO this needs some auth
+export async function POST(request: Request) {
+
+ const { email, user_id } = await request.json()
+
+ const newTeam = {
+ name: uniqueNamesGenerator(customConfig),
+ is_default: false,
+ is_blocked: false,
+ email: email,
+ is_banned: false,
+ blocked_reason: null,
+ tier: 'base_v1',
+ }
+
+ const { data: team, error } = await supabase
+ .from('teams')
+ .insert(newTeam)
+ .select()
+
+ if (error) {
+ // TODO: Add sentry event here
+ console.log(error)
+ return new Response('Failed creating new team', { status: 503 })
+ }
+
+
+ let insertedTeam: Team
+ try {
+ insertedTeam = team[0] as Team
+ }
+ catch (e) {
+ console.log(e)
+ return new Response('Failed creating new team', { status: 503 })
+ }
+
+ const data = await supabase
+ .from('users_teams')
+ .insert({ user_id: user_id, team_id: insertedTeam.id })
+
+ if (data.error) {
+ // TODO: Add sentry event here
+ console.log(data.error)
+ return new Response('Failed creating new team', { status: 503 })
+ }
+
+ return new Response(JSON.stringify({ team: insertedTeam }), { status: 200 })
+}
+
diff --git a/apps/docs/src/app/(main)/dashboard/page.tsx b/apps/docs/src/app/(main)/dashboard/page.tsx
index 402cac2ed..d5ac09a49 100644
--- a/apps/docs/src/app/(main)/dashboard/page.tsx
+++ b/apps/docs/src/app/(main)/dashboard/page.tsx
@@ -3,20 +3,20 @@
import { useEffect, useState } from 'react'
import { BarChart, CreditCard, Key, LucideIcon, Settings, Users } from 'lucide-react'
-import { GeneralContent } from '@/components/Dashboard/General'
import { BillingContent } from '@/components/Dashboard/Billing'
import { TeamContent } from '@/components/Dashboard/Team'
-import { useUser } from '@/utils/useUser'
+import { Team, useUser } from '@/utils/useUser'
import { User } from '@supabase/supabase-js'
import { KeysContent } from '@/components/Dashboard/Keys'
import { UsageContent } from '@/components/Dashboard/Usage'
import { AccountSelector } from '@/components/Dashboard/AccountSelector'
import { useRouter, useSearchParams } from 'next/navigation'
+import { PersonalContent } from '@/components/Dashboard/Personal'
// TODO: Sandbox and Templates tab deleted for now
-const menuLabels = ['general', 'keys', 'usage' ,'billing', 'team',] as const
+const menuLabels = ['personal', 'keys', 'usage' ,'billing', 'team',] as const
type MenuLabel = typeof menuLabels[number]
export default function Dashboard() {
@@ -25,8 +25,17 @@ export default function Dashboard() {
const searchParams = useSearchParams()
const tab = searchParams!.get('tab')
- const initialTab = tab && menuLabels.includes(tab as MenuLabel) ? (tab as MenuLabel) : 'general'
+ const initialTab = tab && menuLabels.includes(tab as MenuLabel) ? (tab as MenuLabel) : 'personal'
const [selectedItem, setSelectedItem] = useState<MenuLabel>(initialTab)
+ const [currentTeam, setCurrentTeam] = useState<Team | null>(null)
+ const [teams, setTeams] = useState<Team[]>([])
+
+ useEffect(() => {
+ if (user) {
+ setCurrentTeam(user.teams[0]) // seems like a sensible default
+ setTeams(user.teams)
+ }
+ }, [user])
useEffect(() => {
if (tab !== selectedItem) {
@@ -43,24 +52,24 @@ export default function Dashboard() {
if (isLoading) {
return <div>Loading...</div>
}
- if (user) {
+ if (user && currentTeam) {
return (
<div className="flex min-h-screen flex-row pt-32 px-32">
- <Sidebar selectedItem={selectedItem} setSelectedItem={setSelectedItem} user={user} />
+ <Sidebar selectedItem={selectedItem} setSelectedItem={setSelectedItem} teams={teams} user={user} currentTeam={currentTeam} setCurrentTeam={setCurrentTeam} setTeams={setTeams} />
<div className="flex-1 pl-10">
<h2 className='text-2xl mb-2 font-bold'>{selectedItem[0].toUpperCase() + selectedItem.slice(1)}</h2>
<div className='border border-white/5 w-full h-[1px] mb-10'/>
- <MainContent selectedItem={selectedItem} user={user} />
+ <MainContent selectedItem={selectedItem} user={user} team={currentTeam} />
</div>
</div>
)
}
}
-const Sidebar = ({ selectedItem, setSelectedItem, user }) => (
+const Sidebar = ({ selectedItem, setSelectedItem, teams, user ,currentTeam, setCurrentTeam, setTeams }) => (
<div className="h-full w-48 space-y-2">
- <AccountSelector user={user} />
+ <AccountSelector teams={teams} user={user} currentTeam={currentTeam} setCurrentTeam={setCurrentTeam} setTeams={setTeams} />
{menuLabels.map((label) => (
<MenuItem
@@ -75,7 +84,7 @@ const Sidebar = ({ selectedItem, setSelectedItem, user }) => (
)
const iconMap: { [key in MenuLabel]: LucideIcon } = {
- general: Settings,
+ personal: Settings,
keys: Key,
usage: BarChart,
billing: CreditCard,
@@ -93,18 +102,18 @@ const MenuItem = ({ icon: Icon, label , selected, onClick }: { icon: LucideIcon;
)
-const MainContent = ({ selectedItem, user }: { selectedItem: MenuLabel, user: User }) => {
+const MainContent = ({ selectedItem, user, team }: { selectedItem: MenuLabel, user: User, team: Team}) => {
switch (selectedItem) {
- case 'general':
- return <GeneralContent user={user} />
+ case 'personal':
+ return <PersonalContent user={user} />
case 'keys':
- return <KeysContent user={user} />
+ return <KeysContent user={user} currentTeam={team} />
case 'usage':
return <UsageContent />
case 'billing':
return <BillingContent />
case 'team':
- return <TeamContent />
+ return <TeamContent team={team} user={user} />
default:
return <ErrorContent />
}
diff --git a/apps/docs/src/components/Dashboard/AccountSelector.tsx b/apps/docs/src/components/Dashboard/AccountSelector.tsx
index 2ed1b9e81..a82d861ba 100644
--- a/apps/docs/src/components/Dashboard/AccountSelector.tsx
+++ b/apps/docs/src/components/Dashboard/AccountSelector.tsx
@@ -6,17 +6,30 @@ import {
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu'
import { ChevronRight, PlusCircle } from 'lucide-react'
+import { toast } from '../ui/use-toast'
-export const AccountSelector = ({ user }) => {
+export const AccountSelector = ({ teams, user, currentTeam, setCurrentTeam, setTeams }) => {
- const teams = user?.teams.map((team: any) => ({
- id: team.id,
- name: team.name,
- default: team.is_default,
- }))
-
- const defaultTeam = teams?.find((teams: any) => teams.default)
+ const createNewTeam = async() => {
+ const res = await fetch('/api/create-new-team', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({ email: user.email, user_id: user.id })
+ })
+ if (!res.ok) {
+ return
+ }
+ const data = await res.json()
+ toast({
+ title: `Team ${data.team.name} created`,
+ })
+
+ setTeams([...teams, data.team])
+ }
+
return(
<DropdownMenu>
<DropdownMenuTrigger
@@ -24,20 +37,20 @@ export const AccountSelector = ({ user }) => {
>
<div className='flex items-start flex-col'>
<p className='text-sm'>Current account</p>
- <h3 className='font-bold'>{defaultTeam.name}</h3>
+ <h3 className='font-bold text-left'>{currentTeam.name}</h3>
</div>
<ChevronRight className='transform transition-transform duration-300 group-hover:rotate-90' />
</DropdownMenuTrigger>
<DropdownMenuContent className='flex flex-col w-48 bg-zinc-900 border border-white/30'>
{teams?.map((team: any) => (
- <DropdownMenuItem key={team.id}>
+ <DropdownMenuItem key={team.id} onClick={() => setCurrentTeam(team)}>
{team.name}
</DropdownMenuItem>
))}
<DropdownMenuSeparator />
<DropdownMenuItem className='flex items-center space-x-1'>
<PlusCircle width={15} height={15} />
- <p>Create Team</p>
+ <p onClick={() => createNewTeam()}>Create Team</p>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
diff --git a/apps/docs/src/components/Dashboard/Billing.tsx b/apps/docs/src/components/Dashboard/Billing.tsx
index 617bcecd4..500385f3b 100644
--- a/apps/docs/src/components/Dashboard/Billing.tsx
+++ b/apps/docs/src/components/Dashboard/Billing.tsx
@@ -11,8 +11,33 @@ function formatCurrency(value: number) {
return value.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
}
+const invoiceUrl = `${process.env.NEXT_PUBLIC_BILLING_API_URL}/invoices`
+
+interface Invoice {
+ cost: number
+ paid: boolean
+ url: string
+ date_created: string
+}
+
export const BillingContent = () => {
- const { credits, usage, isLoading } = useUsage()
+ const { credits, isLoading } = useUsage()
+ const [invoices, setInvoices] = useState<Invoice[]>([])
+
+ useEffect(() => {
+ const getInvoices = async function getInvoices() {
+ const res = await fetch(invoiceUrl, {
+ headers: {
+ // TODO, figure out how data is passed here to get api key
+ 'X-Team-API-Key': '',
+ },
+ })
+ const invoices = await res.json() as Invoice[]
+ setInvoices(invoices)
+ }
+ getInvoices()
+ }
+ , [])
return (
<div className="flex flex-col w-full h-full pb-10">
@@ -24,10 +49,11 @@ export const BillingContent = () => {
<div className='flex flex-col space-y-2 pb-10'>
<h2 className='font-bold text-xl'>Credits left</h2>
<span className="text-sm">Credits automatically are used to bill your team</span>
- {credits && (
- <span className="text-sm font-mono text-green-300/80">${formatCurrency(credits)}</span>
+ {isLoading ? (
+ <span className="text-sm font-mono text-neutral-400">Loading...</span>
+ ) : (
+ <span className="text-sm font-mono text-green-300/80">${formatCurrency(credits ?? 0)}</span>
)}
- {isLoading && <span className="text-sm font-mono text-neutral-400">Loading...</span>}
</div>
<div className='flex items-center space-x-4 pb-4'>
@@ -69,17 +95,19 @@ export const BillingContent = () => {
<TableRow className='hover:bg-orange-500/10 dark:hover:bg-orange-500/10 border-b border-white/5 '>
<TableHead>Date</TableHead>
<TableHead>Cost</TableHead>
- <TableHead>Billed</TableHead>
+ <TableHead>Paid</TableHead>
+ <TableHead>Invoice url</TableHead>
</TableRow>
</TableHeader>
<TableBody>
- {usage.map((usageItem, index) => (
+ {invoices && invoices.length > 0 && invoices.map((item, index) => (
<TableRow
className='hover:bg-orange-300/10 dark:hover:bg-orange-300/10 border-b border-white/5'
key={index}>
- <TableCell>{usageItem.month}/{usageItem.year}</TableCell>
- <TableCell>{usageItem.total_cost}</TableCell>
- <TableCell>{usageItem.unpaid_cost}</TableCell>
+ <TableCell>{new Date(item.date_created).toLocaleDateString()}</TableCell>
+ <TableCell>${item.cost.toFixed(2)}</TableCell>
+ <TableCell>{item.paid ? 'Paid' : 'Unpaid'}</TableCell>
+ <TableCell><a className='hover:cursor-pointer' href={item.url} target="_blank" rel="noreferrer noopener">View invoice</a></TableCell>
</TableRow>
))}
</TableBody>
diff --git a/apps/docs/src/components/Dashboard/Keys.tsx b/apps/docs/src/components/Dashboard/Keys.tsx
index cc5c2f036..21aa94749 100644
--- a/apps/docs/src/components/Dashboard/Keys.tsx
+++ b/apps/docs/src/components/Dashboard/Keys.tsx
@@ -12,25 +12,30 @@ import {
AlertDialogTrigger,
} from '@/components/ui/alert-dialog'
import { Copy, Delete } from 'lucide-react'
-import { useState } from 'react'
+import { useEffect, useState } from 'react'
import { useToast } from '../ui/use-toast'
import { createPagesBrowserClient } from '@supabase/auth-helpers-nextjs'
import { User } from '@supabase/supabase-js'
+import { Team } from '@/utils/useUser'
-export const KeysContent = ({user}: {user: User}) => {
+export const KeysContent = ({user, currentTeam}: {user: User, currentTeam: Team}) => {
const supabase = createPagesBrowserClient()
const { toast } = useToast()
const [isDialogOpen, setIsDialogOpen] = useState(false)
const [currentKey, setCurrentKey] = useState<string | null>(null)
const [hoveredKey, setHoveredKey] = useState<string | null>(null)
+ const [apiKeys, setApiKeys] = useState<any[]>([])
- //@ts-ignore
- const [apiKeys, setApiKeys] = useState<{ key: string, createdAt: string }[]>(user?.apiKeys.map((apiKey: any) => ({
- key: apiKey.api_key,
- createdAt: apiKey.created_at,
- })) || [])
+ useEffect(() => {
+ //@ts-ignore
+ const filteredApiKeys = user?.apiKeys.filter((apiKey: any) => apiKey.team_id === currentTeam.id).map((apiKey: any) => ({
+ key: apiKey.api_key,
+ createdAt: apiKey.created_at,
+ }))
+ setApiKeys(filteredApiKeys)
+ }, [currentTeam, user])
const closeDialog = () => setIsDialogOpen(false)
const openDialog = (key: string) => {
@@ -57,10 +62,8 @@ export const KeysContent = ({user}: {user: User}) => {
const addApiKey = async() => {
- // TODO, make team selection real
- //@ts-ignore
- const teamId = user?.teams[0].id as string
-
+ const teamId = currentTeam.id
+
const res = await fetch('/api/create-api-key', {
method: 'POST',
headers: {
@@ -78,7 +81,7 @@ export const KeysContent = ({user}: {user: User}) => {
title: 'API key created',
})
- setApiKeys([...apiKeys, {key: newKey.api_key, createdAt: newKey.created_at}])
+ setApiKeys([...apiKeys, {key: newKey.api_key, team_id: teamId, createdAt: newKey.created_at}])
}
const copyToClipboard = (text: string) => {
@@ -90,9 +93,9 @@ export const KeysContent = ({user}: {user: User}) => {
const maskApiKey = (key: string) => {
const firstFour = key.slice(0, 4)
- const lastTwo = key.slice(-2)
- const stars = '*'.repeat(key.length - 6) // use fixed-width character
- return `${firstFour}${stars}${lastTwo}`
+ const lastFour = key.slice(-4)
+ const stars = '*'.repeat(key.length - 8) // use fixed-width character
+ return `${firstFour}${stars}${lastFour}`
}
return (
diff --git a/apps/docs/src/components/Dashboard/General.tsx b/apps/docs/src/components/Dashboard/Personal.tsx
similarity index 95%
rename from apps/docs/src/components/Dashboard/General.tsx
rename to apps/docs/src/components/Dashboard/Personal.tsx
index 1c5215f65..9ff16b803 100644
--- a/apps/docs/src/components/Dashboard/General.tsx
+++ b/apps/docs/src/components/Dashboard/Personal.tsx
@@ -6,7 +6,7 @@ import { User } from '@supabase/supabase-js'
import { createPagesBrowserClient } from '@supabase/auth-helpers-nextjs'
-export const GeneralContent = ({user}: {user: User}) => {
+export const PersonalContent = ({user}: {user: User}) => {
const { toast } = useToast()
const updateUserEmail = async() => {
@@ -29,7 +29,7 @@ export const GeneralContent = ({user}: {user: User}) => {
<div className="flex flex-col h-full">
<h1 className="font-bold pb-10 text-xl">
- Personal info
+ Personal settings
</h1>
<span className='text-neutral-300 pb-2'>Email:</span>
<div className='flex w-full items-center space-x-2 pb-10'>
diff --git a/apps/docs/src/components/Dashboard/Team.tsx b/apps/docs/src/components/Dashboard/Team.tsx
index 3452d0e5b..44a5c8116 100644
--- a/apps/docs/src/components/Dashboard/Team.tsx
+++ b/apps/docs/src/components/Dashboard/Team.tsx
@@ -1,54 +1,80 @@
'use client'
-import {
- Table,
- TableBody,
- TableCell,
- TableHead,
- TableHeader,
- TableRow,
-} from '@/components/ui/table'
-
-import {
- AlertDialog,
- AlertDialogAction,
- AlertDialogCancel,
- AlertDialogContent,
- AlertDialogDescription,
- AlertDialogFooter,
- AlertDialogHeader,
- AlertDialogTitle,
- AlertDialogTrigger,
-} from '@/components/ui/alert-dialog'
+
+
+
+
+
import { useState } from 'react'
-import { Delete } from 'lucide-react'
import { Button } from '../Button'
+import { Team } from '@/utils/useUser'
+import { User, createPagesBrowserClient } from '@supabase/auth-helpers-nextjs'
+import { toast } from '../ui/use-toast'
+import { Copy } from 'lucide-react'
+
+// interface Member {
+// id: string
+// name: string
+// }
+
+
+export const TeamContent = ({ team, user }: { team: Team, user: User }) => {
+ const supabase = createPagesBrowserClient()
-const fakeTeam = {
- id: '1',
- name: 'Default Team',
- users: [{ id: '1', name: 'User1', role: 'admin' }, { id: '2', name: 'User2', role: 'user' }]
-}
-
-export const TeamContent = () => {
- const [isDialogOpen, setIsDialogOpen] = useState(false)
- const [currentKeyId, setCurrentUserId] = useState<string | null>(null)
- const [team, setTeam] = useState(fakeTeam)
-
- // TODO: this logs just to make build work, remove it later
- console.log(currentKeyId)
-
- const closeDialog = () => setIsDialogOpen(false)
- const openDialog = (id: string) => {
- setCurrentUserId(id)
- setIsDialogOpen(true)
- }
+ // const [isDialogOpen, setIsDialogOpen] = useState(false)
+ // const [currentMemberId, setCurrentMemberId] = useState<string | null>(null)
+ const [teamName, setTeamName] = useState(team.name)
+ const [userToAdd, setUserToAdd] = useState('')
+
+ console.log(team.name)
+
+ // const closeDialog = () => setIsDialogOpen(false)
+ // const openDialog = (id: string) => {
+ // setCurrentMemberId(id)
+ // setIsDialogOpen(true)
+ // }
- const deleteUserFromTeam = () => {
+ // const deleteUserFromTeam = () => {
// setApiKeys(apiKeys.filter(apiKey => apiKey.id !== currentKeyId))
- closeDialog()
- }
+ // closeDialog()
+ // }
+
+
+ const changeTeamName = async() => {
+ const { error} = await supabase
+ .from('teams')
+ .update({ name: teamName })
+ .eq('id', team.id)
+
+ if (error) {
+ // TODO: Add sentry event here
+ console.log(error)
+ return
+ }
+
+ toast({
+ title: 'Team name changed',
+ })
+ setTeamName(teamName)
+ }
+
+ const addUserToTeam = async() => {
+ const { error } = await supabase
+ .from('users_teams')
+ .insert({ user_id: userToAdd, team_id: team.id })
+
+ if (error) {
+ // TODO: Add sentry event here
+ console.log(error)
+ return
+ }
+
+ setUserToAdd('')
+ toast({
+ title: 'User added to team',
+ })
+ }
return (
<div className='flex flex-col justify-center'>
@@ -58,23 +84,43 @@ export const TeamContent = () => {
type="text"
className="w-1/3 border border-white/10 text-sm focus:outline-none outline-none rounded-md p-2"
placeholder={team.name}
- value={team.name}
- onChange={(e) => setTeam({ ...team, name: e.target.value })}
+ onChange={(e) => {
+ e.preventDefault()
+ setTeamName(e.target.value)
+ }}
/>
- <Button variant='outline'>Save changes</Button>
+ <Button variant='outline' onClick={() => changeTeamName()}>Save changes</Button>
</div>
- <h2 className="text-xl font-bold pb-4">Invite new members</h2>
- <div className='flex items-center space-x-2 pb-10'>
+ <h2 className="text-xl font-bold pb-4">Add new members</h2>
+ <div className='flex items-center space-x-2 pb-4'>
<input
type="text"
className="w-1/3 border border-white/10 text-sm focus:outline-none outline-none rounded-md p-2"
- placeholder="[email protected]"
+ placeholder={"paste your friend's user id here"}
+ value={userToAdd}
+ onChange={(e) => {
+ e.preventDefault()
+ setUserToAdd(e.target.value)
+ }}
/>
- <Button variant='outline'>Send invite</Button>
+ <Button variant='outline' onClick={() => addUserToTeam()}>Add user</Button>
</div>
- <h2 className="text-xl font-bold pb-4">Team members</h2>
+ <span
+ className='flex pb-10 w-fit text-sm text-orange-500 hover:cursor-pointer hover:text-orange-500/30 space-x-2 items-center'
+ onClick={() => {
+ navigator.clipboard.writeText(user.id)
+ toast({
+ title: 'User id copied to clipboard',
+ })
+ }}
+ >
+ <p>copy your user id</p>
+ <Copy className='h-4 w-4'/>
+ </span>
+
+ {/* <h2 className="text-xl font-bold pb-4">Team members</h2>
<Table>
<TableHeader>
<TableRow className='hover:bg-orange-500/10 dark:hover:bg-orange-500/10 border-b border-white/5 '>
@@ -83,8 +129,8 @@ export const TeamContent = () => {
<TableHead></TableHead>
</TableRow>
</TableHeader>
- <TableBody>
- {team.users.map((user) => (
+ <TableBody> */}
+ {/* {team.users.map((user) => (
<TableRow
className='hover:bg-orange-300/10 dark:hover:bg-orange-300/10 border-b border-white/5'
key={user.id}>
@@ -94,12 +140,12 @@ export const TeamContent = () => {
<Delete className='hover:cursor-pointer' color='red' width={20} height={20} onClick={() => openDialog(user.id)} />
</TableCell>
</TableRow>
- ))}
- </TableBody>
- </Table>
+ ))} */}
+ {/* </TableBody>
+ </Table> */}
- <AlertDialog open={isDialogOpen} onOpenChange={setIsDialogOpen}>
+ {/* <AlertDialog open={isDialogOpen} onOpenChange={setIsDialogOpen}>
<AlertDialogTrigger asChild>
<Button variant="outline" style={{ display: 'none' }}>Show Dialog</Button>
</AlertDialogTrigger>
@@ -116,7 +162,7 @@ export const TeamContent = () => {
<AlertDialogAction className='bg-red-500 text-white hover:bg-red-600' onClick={deleteUserFromTeam}>Continue</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
- </AlertDialog>
+ </AlertDialog> */}
</div>
)
diff --git a/apps/docs/src/utils/useUser.tsx b/apps/docs/src/utils/useUser.tsx
index 1e61ed570..d591f21b3 100644
--- a/apps/docs/src/utils/useUser.tsx
+++ b/apps/docs/src/utils/useUser.tsx
@@ -6,7 +6,7 @@ import { createPagesBrowserClient } from '@supabase/auth-helpers-nextjs'
import { type Session } from '@supabase/supabase-js'
import * as Sentry from '@sentry/nextjs'
-type Team = {
+export type Team = {
id: string
name: string
tier: string