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)}> Dollars Off Total Percent of Total Dollars Off Per Sock Free Socks Math.floor(float * 100)} /> Math.floor(float * 100)} /> Create > ) }
(Leave blank for random code)