Skip to content

Commit

Permalink
Don't allow do checkouts on custom domains
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubno committed Dec 19, 2024
1 parent 2844aba commit dbe569d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/web/src/components/Pricing/SwitchToProButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,17 @@ import Spinner from '@/components/Spinner'

import { TierActiveTag } from './TierActiveTag'
import { getBillingUrl } from '@/app/(dashboard)/dashboard/utils'
import { toast } from '@/components/ui/use-toast'

function createCheckout(domain: string, tierID: string, teamID: string) {
if (domain !== 'e2b.dev') {
console.error('Managing billing is allowed only at e2b.dev.')
toast({
title: 'Error',
description: 'Managing billing is allowed only at e2b.dev.',
})
}

return fetch(`${getBillingUrl(domain)}/checkouts`, {
method: 'POST',
headers: {
Expand Down

0 comments on commit dbe569d

Please sign in to comment.