import { useRouter } from 'next/router'
import { Form, Input, SubmitButton } from '../components/form'
import Link from 'next/link'
import Button from 'react-bootstrap/Button'
import * as Yup from 'yup'
import { gql, useMutation } from '@apollo/client'
import { InvoiceSkeleton } from '../components/invoice'
import LayoutCenter from '../components/layout-center'
export default function Wallet () {
return (
)
}
export function WalletForm () {
const router = useRouter()
if (!router.query.type) {
return (
or
)
}
if (router.query.type === 'fund') {
return
} else {
return
}
}
export const FundSchema = Yup.object({
amount: Yup.number('must be a number').required('required').positive('must be positive').integer('must be whole')
})
export function FundForm () {
const router = useRouter()
const [createInvoice, { called }] = useMutation(gql`
mutation createInvoice($amount: Int!) {
createInvoice(amount: $amount) {
id
}
}`)
if (called) {
return
}
return (
)
}
export function WithdrawlForm () {
return withdrawl
}