mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-08 15:05:22 +02:00
Remove billing & upgrade references when STRIPE_API_KEY is missing
This commit is contained in:
parent
7d46d22152
commit
e1f8de527a
4 changed files with 11 additions and 8 deletions
|
@ -35,7 +35,7 @@ export default function SettingsPage() {
|
|||
<Tab.List>
|
||||
<Tab>Details</Tab>
|
||||
<Tab>Security</Tab>
|
||||
<Tab>Billing</Tab>
|
||||
{process.env.STRIPE_API_KEY && <Tab>Billing</Tab>}
|
||||
</Tab.List>
|
||||
<Tab.Panels>
|
||||
<Tab.Panel>
|
||||
|
@ -46,9 +46,11 @@ export default function SettingsPage() {
|
|||
<SecurityPreferences />
|
||||
</div>
|
||||
</Tab.Panel>
|
||||
<Tab.Panel>
|
||||
<BillingPreferences />
|
||||
</Tab.Panel>
|
||||
{process.env.STRIPE_API_KEY && (
|
||||
<Tab.Panel>
|
||||
<BillingPreferences />
|
||||
</Tab.Panel>
|
||||
)}
|
||||
</Tab.Panels>
|
||||
</Tab.Group>
|
||||
</section>
|
||||
|
|
|
@ -313,7 +313,6 @@ function DefaultContent({
|
|||
email,
|
||||
}: PropsWithChildren<{ onboarding?: ReactNode; name?: string; email?: string }>) {
|
||||
const { addAccount } = useAccountContext()
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
|
@ -338,7 +337,7 @@ function DefaultContent({
|
|||
|
||||
{onboarding && onboarding}
|
||||
|
||||
<UpgradePrompt />
|
||||
{process.env.STRIPE_API_KEY && <UpgradePrompt />}
|
||||
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="text-base">
|
||||
|
|
|
@ -174,7 +174,7 @@ export function MobileLayout({ children, sidebar }: MobileLayoutProps) {
|
|||
</section>
|
||||
|
||||
<div className="pt-6 shrink-0">
|
||||
<UpgradePrompt />
|
||||
{process.env.STRIPE_API_KEY && <UpgradePrompt />}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -78,7 +78,9 @@ export function BillingPreferences() {
|
|||
</div>
|
||||
)}
|
||||
</div>
|
||||
<UpgradeTakeover open={takeoverOpen} onClose={() => setTakeoverOpen(false)} />
|
||||
{process.env.STRIPE_API_KEY && (
|
||||
<UpgradeTakeover open={takeoverOpen} onClose={() => setTakeoverOpen(false)} />
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue