From 2e07355373185ff32b9d12d7118441dd7dd3e035 Mon Sep 17 00:00:00 2001 From: bunsy-0900 Date: Tue, 16 Jan 2024 14:33:23 +0700 Subject: [PATCH 1/2] fix: add missing imports --- signup-ui/src/app/AppRouter.tsx | 1 + .../SignUpPage/AccountSetup/AccountSetup.tsx | 22 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/signup-ui/src/app/AppRouter.tsx b/signup-ui/src/app/AppRouter.tsx index 97d171d7..47c0ef6c 100644 --- a/signup-ui/src/app/AppRouter.tsx +++ b/signup-ui/src/app/AppRouter.tsx @@ -16,6 +16,7 @@ import { UNDER_CONSTRUCTION, } from "~constants/routes"; import { lazyRetry } from "~utils/lazyRetry"; +import { setupResponseInterceptor } from "~services/api.service"; const SignUpPage = lazy(() => lazyRetry(() => import("~pages/SignUpPage"))); const ResetPasswordPage = lazy(() => diff --git a/signup-ui/src/pages/SignUpPage/AccountSetup/AccountSetup.tsx b/signup-ui/src/pages/SignUpPage/AccountSetup/AccountSetup.tsx index aabdf28f..cfbb146a 100644 --- a/signup-ui/src/pages/SignUpPage/AccountSetup/AccountSetup.tsx +++ b/signup-ui/src/pages/SignUpPage/AccountSetup/AccountSetup.tsx @@ -1,7 +1,7 @@ import { KeyboardEvent, useCallback, useMemo, useState } from "react"; import { PopoverTrigger } from "@radix-ui/react-popover"; import { UseFormReturn } from "react-hook-form"; -import { useTranslation } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; import { Button } from "~components/ui/button"; import { Checkbox } from "~components/ui/checkbox"; @@ -63,7 +63,7 @@ export const AccountSetup = ({ settings, methods }: AccountSetupProps) => { const { registerMutation } = useRegister(); const [openTermConditionModal, setOpenTermConditionModal] = useState(false); - const [modalData, setModalData] = useState({title: "", content: ""}); + const [modalData, setModalData] = useState({ title: "", content: "" }); const disabledContinue = !isValid || @@ -121,20 +121,26 @@ export const AccountSetup = ({ settings, methods }: AccountSetupProps) => { const onModalToggle = () => { setOpenTermConditionModal(false); - setModalData({title: "", content: ""}); - } + setModalData({ title: "", content: "" }); + }; const onOpenTerm = (e: any) => { e.preventDefault(); - setModalData({title: t("terms_and_conditions_title"), content: t("terms_and_conditions_content")}); + setModalData({ + title: t("terms_and_conditions_title"), + content: t("terms_and_conditions_content"), + }); setOpenTermConditionModal(true); - } + }; const onOpenPrivacy = (e: any) => { e.preventDefault(); - setModalData({title: t("privacy_and_policy_title"), content: t("privacy_and_policy_content")}); + setModalData({ + title: t("privacy_and_policy_title"), + content: t("privacy_and_policy_content"), + }); setOpenTermConditionModal(true); - } + }; const handleFullNameInput = (event: KeyboardEvent) => handleInputFilter( From 3caa7d204688faf849037df85aae6e6f2db32988 Mon Sep 17 00:00:00 2001 From: bunsy-0900 Date: Tue, 16 Jan 2024 14:33:23 +0700 Subject: [PATCH 2/2] fix: add missing imports Signed-off-by: bunsy-0900 --- signup-ui/src/app/AppRouter.tsx | 1 + .../SignUpPage/AccountSetup/AccountSetup.tsx | 22 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/signup-ui/src/app/AppRouter.tsx b/signup-ui/src/app/AppRouter.tsx index 97d171d7..47c0ef6c 100644 --- a/signup-ui/src/app/AppRouter.tsx +++ b/signup-ui/src/app/AppRouter.tsx @@ -16,6 +16,7 @@ import { UNDER_CONSTRUCTION, } from "~constants/routes"; import { lazyRetry } from "~utils/lazyRetry"; +import { setupResponseInterceptor } from "~services/api.service"; const SignUpPage = lazy(() => lazyRetry(() => import("~pages/SignUpPage"))); const ResetPasswordPage = lazy(() => diff --git a/signup-ui/src/pages/SignUpPage/AccountSetup/AccountSetup.tsx b/signup-ui/src/pages/SignUpPage/AccountSetup/AccountSetup.tsx index aabdf28f..cfbb146a 100644 --- a/signup-ui/src/pages/SignUpPage/AccountSetup/AccountSetup.tsx +++ b/signup-ui/src/pages/SignUpPage/AccountSetup/AccountSetup.tsx @@ -1,7 +1,7 @@ import { KeyboardEvent, useCallback, useMemo, useState } from "react"; import { PopoverTrigger } from "@radix-ui/react-popover"; import { UseFormReturn } from "react-hook-form"; -import { useTranslation } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; import { Button } from "~components/ui/button"; import { Checkbox } from "~components/ui/checkbox"; @@ -63,7 +63,7 @@ export const AccountSetup = ({ settings, methods }: AccountSetupProps) => { const { registerMutation } = useRegister(); const [openTermConditionModal, setOpenTermConditionModal] = useState(false); - const [modalData, setModalData] = useState({title: "", content: ""}); + const [modalData, setModalData] = useState({ title: "", content: "" }); const disabledContinue = !isValid || @@ -121,20 +121,26 @@ export const AccountSetup = ({ settings, methods }: AccountSetupProps) => { const onModalToggle = () => { setOpenTermConditionModal(false); - setModalData({title: "", content: ""}); - } + setModalData({ title: "", content: "" }); + }; const onOpenTerm = (e: any) => { e.preventDefault(); - setModalData({title: t("terms_and_conditions_title"), content: t("terms_and_conditions_content")}); + setModalData({ + title: t("terms_and_conditions_title"), + content: t("terms_and_conditions_content"), + }); setOpenTermConditionModal(true); - } + }; const onOpenPrivacy = (e: any) => { e.preventDefault(); - setModalData({title: t("privacy_and_policy_title"), content: t("privacy_and_policy_content")}); + setModalData({ + title: t("privacy_and_policy_title"), + content: t("privacy_and_policy_content"), + }); setOpenTermConditionModal(true); - } + }; const handleFullNameInput = (event: KeyboardEvent) => handleInputFilter(