chase-moskal / xiome

open-source cloud-powered web components
https://xiome.io/
MIT License
10 stars 13 forks source link

fakestripe popup for customer portal #152

Closed chase-moskal closed 2 years ago

chase-moskal commented 2 years ago
chase-moskal commented 2 years ago

image

chase-moskal commented 2 years ago
const {userLoggedIn, storeActive} = storeModel.get.is
// ... render the correct slots
chase-moskal commented 2 years ago

if we want to render a loading spinner when either accessOp (user login) or connectStatusOp (stripe store status) is loading, we can do something like this:

const metaOp = ops.combine(
  storeModel.state.user.accessOp,
  storeModel.state.stripeConnect.connectStatusOp,
)
return renderOp(metaOp, () => html`
  <h3>Customer Portal</h3>
  <p>...</p>
`)