handle blocked stripe

This commit is contained in:
ntr 2019-10-26 15:56:14 +11:00
parent f40b6c65b7
commit 1694a21b9f
2 changed files with 12 additions and 6 deletions

View File

@ -36,9 +36,12 @@ events.setWs(ws);
const App = () => (
<Provider store={store}>
<StripeProvider apiKey={stripeKey()}>
<Mnml />
</StripeProvider>
{window.Stripe
? <StripeProvider apiKey={stripeKey()}>
<Mnml />
</StripeProvider>
: <Mnml />
}
</Provider>
);

View File

@ -48,9 +48,12 @@ function Shop(args) {
</div>
<div>
<h1 class="credits">¤ {account.balance}</h1>
<Elements>
<StripeBtns account={account} />
</Elements>
{window.stripe
? <Elements>
<StripeBtns account={account} />
</Elements>
: <div>Please unblock Stripe to use the store</div>
}
</div>
</section>
);