import { Component } from 'preact'; const layer0 = require('../layer0'); export default class MembersProvider extends Component { constructor() { super(); this.setGatewayFrame = gatewayFrame => this.gatewayFrame = gatewayFrame; this.ready = new Promise((resolve) => { this.setReady = resolve; }) this.gateway = null; } getChildContext() { return { members: { createSubscription: this.createMethod('createSubscription'), signin: this.createMethod('signin'), signup: this.createMethod('signup'), requestPasswordReset: this.createMethod('requestPasswordReset'), resetPassword: this.createMethod('resetPassword'), getConfig: this.createMethod('getConfig'), } }; } render({apiUrl, children}) { const src = `${apiUrl}/members/gateway`; return (