From d32206b8bfdd8ebbc9ec91e5bf0e011c2a969fe7 Mon Sep 17 00:00:00 2001 From: roshni73 Date: Wed, 20 Nov 2024 16:39:07 +0545 Subject: [PATCH] Add mutation for register --- src/components/Navbar/index.tsx | 3 - src/components/NonFiledError/i18n.json | 6 + src/components/NonFiledError/index.tsx | 65 +++++++ .../NonFiledError/styles.module.css | 21 +++ src/utils/errorTransform.ts | 86 +++++++++ src/utils/user.ts | 31 ---- src/views/Register/i18n.json | 4 +- src/views/Register/index.tsx | 166 ++++++++++++------ 8 files changed, 289 insertions(+), 93 deletions(-) create mode 100644 src/components/NonFiledError/i18n.json create mode 100644 src/components/NonFiledError/index.tsx create mode 100644 src/components/NonFiledError/styles.module.css create mode 100644 src/utils/errorTransform.ts delete mode 100644 src/utils/user.ts diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx index e9ab985f..1511ed72 100644 --- a/src/components/Navbar/index.tsx +++ b/src/components/Navbar/index.tsx @@ -19,7 +19,6 @@ import UserContext from '#contexts/user'; import { LogoutMutation } from '#generated/types/graphql'; import useAuth from '#hooks/domain/useAuth'; import useAlert from '#hooks/useAlert'; -import useAuth from '#hooks/useAuth'; import LangaugeDropdown from './LanguageDropdown'; @@ -76,8 +75,6 @@ function Navbar(props: Props) { }, }, ); - - const { isAuthenticated } = useAuth(); return (