import {useState} from 'react' import router from 'next/router' import {DateTime} from 'luxon' import ActionBar from '~/components/admin/actionBar' import {FormController, Dropdown, Input, IntegerInput, DecimalInput, DateInput, Button, Checkbox} from '~/components/form' export default function NewCoupon() { const afterCreate = (coupon) => { router.push(`/admin/coupons`) } const [couponType, setType] = useState('flat') return ( <>

(Leave blank for random code)

!!date} minDate={new Date()} transform={date => DateTime.fromISO(date).plus({hours: 24}).toISO()}/> setType(ev.target.value)}>
) }