Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Remove temporal pro tier handling

Jakub Novakc470cc340d65
diff --git a/apps/docs/src/app/pricing/SwitchToProButton.tsx b/apps/docs/src/app/pricing/SwitchToProButton.tsx
index 124239884..8b5dd6d9e 100644
--- a/apps/docs/src/app/pricing/SwitchToProButton.tsx
+++ b/apps/docs/src/app/pricing/SwitchToProButton.tsx
@@ -81,7 +81,7 @@ function SwitchTierButton() {
</Button>
)}
- {(user.pricingTier.id === tiers.pro.id && !user.teams[0].team_billing[0].credit_card_added) && (
+ {(user.pricingTier.id === tiers.pro.id) && (
<Button
onClick={createCheckoutSession}
>
diff --git a/apps/docs/src/utils/useUser.tsx b/apps/docs/src/utils/useUser.tsx
index e845474de..3df8bae0b 100644
--- a/apps/docs/src/utils/useUser.tsx
+++ b/apps/docs/src/utils/useUser.tsx
@@ -12,9 +12,6 @@ type Team = {
tier: string
is_default: boolean
email: string
- team_billing: {
- credit_card_added: boolean
- }[]
}
type UserContextType = {
@@ -104,7 +101,7 @@ export const CustomUserContextProvider = (props) => {
// @ts-ignore
const { data: userTeams, teamsError } = await supabase
.from('users_teams')
- .select('teams (id, name, is_default, tier, email, team_billing (credit_card_added))')
+ .select('teams (id, name, is_default, tier, email)')
.eq('user_id', session?.user.id) // Due to RLS, we could also safely just fetch all, but let's be explicit for sure
if (teamsError) Sentry.captureException(teamsError)