From 135adecdc2752665757543c142592cd9b3397223 Mon Sep 17 00:00:00 2001 From: Gary van Woerkens Date: Tue, 5 Dec 2023 20:28:51 +0100 Subject: [PATCH] fix: sync onboarding request and form hooks --- .talismanrc | 2 ++ src/components/common/wizard/index.tsx | 8 +++----- src/components/onboarding/index.tsx | 5 ++--- src/hooks/use-onboarding.ts | 13 +++++++------ 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.talismanrc b/.talismanrc index 1b237a7fa..7d76bf195 100644 --- a/.talismanrc +++ b/.talismanrc @@ -15,6 +15,8 @@ fileignoreconfig: checksum: 390c88e78b3e8bd3153e028403a3ffea2b5da636eeab22c307788cbddb86e096 - filename: src/components/users/toggle-account-modal.tsx checksum: 2d0bd58b461814a6d2d934d96441ed7962a74f2d184e2581b38b4990562dde70 +- filename: src/hooks/use-onboarding.ts + checksum: 5a4e696e13c7b9674979b192acb1e73b55694b93e54d54e805b74ad3a288dc40 - filename: src/services/disablers/ovh.ts checksum: 390c9e51cf01b5db14a4af94a4182c3d55ccddeb7905462b21b0a5f23b8d24e9 - filename: src/services/enablers/ovh.ts diff --git a/src/components/common/wizard/index.tsx b/src/components/common/wizard/index.tsx index bf5c596ab..82a867bc6 100644 --- a/src/components/common/wizard/index.tsx +++ b/src/components/common/wizard/index.tsx @@ -1,4 +1,4 @@ -import { useEffect, useState } from "react" +import { useState } from "react" import Stepper from "./stepper" @@ -17,13 +17,10 @@ const Wizard = ({ }) => { const [isValidStep, setValidStep] = useState(false) const [activeStepIndex, setActiveStepIndex] = useState(0) - const [fields, setFields] = useState(data) const { component: Step } = steps[activeStepIndex] const isLastStep = activeStepIndex === steps.length - 1 - useEffect(() => setFields(data), [data]) - const PreviousButton = () => (