import React from 'react' import { Head } from 'next' import { Elements, StripeProvider, CardElement, injectStripe } from 'react-stripe-elements' import { useAsyncCallback } from 'actionsack' import Button from './Button' import Input from './Input' import { useAuth } from './AuthContext' import LoginButton from './LoginButton' import { COLORS } from '../lib/constants' const X = ( ) function Billing(props) { const user = useAuth() const [submit, { error, loading, data: success }] = useAsyncCallback(async e => { e.preventDefault() const name = e.target.name.value.trim() const res = await props.stripe.createToken({ name }) if (res.error) { throw res.error.message } return {} }) if (!user) { return (
However, Carbon Diamond is not quite ready yet.
Your card has not been charged or saved today.
We greatly appreciate your support, and will contact you when these premium features
launch!
— the Carbon Team{' '} 💛🖤
Please enter a credit or debit card: