From 45b9deef24277efdb1da557047af266eb93d4e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Soulas?= Date: Thu, 29 Aug 2024 10:52:21 +0200 Subject: [PATCH] feat(admin): add back button on user account settings v3 --- .../user-accounts/_components/UserAccountForm.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/reva-admin-react/src/app/(aap)/agencies-settings/user-accounts/_components/UserAccountForm.tsx b/packages/reva-admin-react/src/app/(aap)/agencies-settings/user-accounts/_components/UserAccountForm.tsx index 6e46b2cf9..0bef6901b 100644 --- a/packages/reva-admin-react/src/app/(aap)/agencies-settings/user-accounts/_components/UserAccountForm.tsx +++ b/packages/reva-admin-react/src/app/(aap)/agencies-settings/user-accounts/_components/UserAccountForm.tsx @@ -7,6 +7,7 @@ import { useCallback, useEffect } from "react"; import { useForm, useWatch } from "react-hook-form"; import { z } from "zod"; +import { useFeatureflipping } from "@/components/feature-flipping/featureFlipping"; export const userAccountFormSchema = z.object({ firstname: z @@ -43,6 +44,9 @@ export const UserAccountForm = ({ defaultValues?: UserAccountFormData; emailFieldDisabled?: boolean; }) => { + const { isFeatureActive } = useFeatureflipping(); + const isSettingsV3Enabled = isFeatureActive("AAP_SETTINGS_V3"); + const methods = useForm({ resolver: zodResolver(userAccountFormSchema), defaultValues: defaultValues || { @@ -191,7 +195,10 @@ export const UserAccountForm = ({ )} - + );