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 = () => ( const App = () => (
<Provider store={store}> <Provider store={store}>
<StripeProvider apiKey={stripeKey()}> {window.Stripe
<Mnml /> ? <StripeProvider apiKey={stripeKey()}>
</StripeProvider> <Mnml />
</StripeProvider>
: <Mnml />
}
</Provider> </Provider>
); );

View File

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