Skip to content

armgit / E2B

Public Imported from GitHub
0

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

changes based on comments in PR

ErikKaumk7dcaa575afbc
diff --git a/apps/docs/src/app/(main)/dashboard/page.tsx b/apps/docs/src/app/(main)/dashboard/page.tsx
index 95338e047..0b4b08b42 100644
--- a/apps/docs/src/app/(main)/dashboard/page.tsx
+++ b/apps/docs/src/app/(main)/dashboard/page.tsx
@@ -45,7 +45,8 @@ export default function Dashboard() {
useEffect(() => {
if (user) {
- setCurrentTeam(user.teams[0]) // seems like a sensible default
+ const defaultTeam = user.teams.find(team => team.is_default)
+ setCurrentTeam(defaultTeam || user.teams[0]) // seems like a sensible default
setTeams(user.teams)
}
}, [user])
diff --git a/apps/docs/src/components/Dashboard/Usage.tsx b/apps/docs/src/components/Dashboard/Usage.tsx
index 54d91524c..4d6229403 100644
--- a/apps/docs/src/components/Dashboard/Usage.tsx
+++ b/apps/docs/src/components/Dashboard/Usage.tsx
@@ -10,13 +10,13 @@ export const UsageContent = ({ currentApiKey }: { currentApiKey: string | null})
const [ramData, setRamData] = useState<any>(null)
useEffect(() => {
- const getUsage = async () => {
+ const getUsage = async (apiKey: string) => {
setVcpuData(null)
setRamData(null)
const response = await fetch(usageUrl, {
headers: {
- 'X-Team-API-Key': currentApiKey!
+ 'X-Team-API-Key': apiKey
}
})
if (!response.ok) {
@@ -33,7 +33,7 @@ export const UsageContent = ({ currentApiKey }: { currentApiKey: string | null})
setRamData(ramSeries)
}
if (currentApiKey) {
- getUsage()
+ getUsage(currentApiKey)
}
}, [currentApiKey])
diff --git a/apps/docs/src/components/HeaderMain.tsx b/apps/docs/src/components/HeaderMain.tsx
index 1e2d119a1..ea9adac84 100644
--- a/apps/docs/src/components/HeaderMain.tsx
+++ b/apps/docs/src/components/HeaderMain.tsx
@@ -42,11 +42,12 @@ export const HeaderMain = forwardRef(function Header({ className }, ref) {
<div className="flex justify-center items-center space-x-5">
<div className="flex items-center justify-center text-sm space-x-3 text-neutral-400">
- <p className='hover:text-white hover:cursor-pointer'>Changelog</p>
<Link className='hover:text-white hover:cursor-pointer' href='/docs'>
Docs
</Link>
- <p className='hover:text-white hover:cursor-pointer'>Blog</p>
+ <Link className='hover:text-white hover:cursor-pointer' href='/Dashboard'>
+ Dashboard
+ </Link>
</div>
<div className="flex items-center gap-5">
diff --git a/apps/docs/src/utils/useUser.tsx b/apps/docs/src/utils/useUser.tsx
index 408b70885..6810734b7 100644
--- a/apps/docs/src/utils/useUser.tsx
+++ b/apps/docs/src/utils/useUser.tsx
@@ -12,9 +12,6 @@ export type Team = {
tier: string
is_default: boolean
email: string
- team_billing: {
- credit_card_added: boolean
- }[]
}
type UserContextType = {