import env from "/_/code/env.js" class Settings extends Shadow { handleConnectStripe = () => { const params = new URLSearchParams({ response_type: 'code', client_id: env.client_id, scope: 'read_write', redirect_uri: `${env.baseURL}/stripe/onboardingcomplete`, }); window.location.href = `https://connect.stripe.com/oauth/authorize?${params}`; }; render() { ZStack(() => { h1("Settings") .fontWeight("bold") .marginTop(4, pct) .marginLeft(5, pct) VStack(() => { HStack(() => { p("Stripe Integration") button("Set up Stripe") .maxWidth(10, em) .onClick((done) => { this.handleConnectStripe() }) }) .gap(10, pct) .verticalAlign("center") }) .gap(0.5, em) .paddingLeft(5, pct) .marginTop(4, em) }) } } register(Settings)