fix
This commit is contained in:
@@ -65,13 +65,14 @@ export default function Route({
|
||||
}: Route.ComponentProps) {
|
||||
const fetcher = useFetcher()
|
||||
const [mounted, setMounted] = useState(false)
|
||||
const { index, kind, setIndex, setKind } = useWizardStore()
|
||||
const { index, kind, setIndex, setKind, reset, ...state } = useWizardStore()
|
||||
|
||||
const onSubmit = async (data: WizardState) => {
|
||||
await fetcher.submit(JSON.stringify(data), {
|
||||
const onSubmit = async () => {
|
||||
await fetcher.submit(JSON.stringify(state), {
|
||||
method: 'post',
|
||||
encType: 'application/json'
|
||||
})
|
||||
// reset()
|
||||
}
|
||||
|
||||
useMount(() => {
|
||||
|
||||
Reference in New Issue
Block a user