From 023b7975205cbd74df03a9cb5aa8e2e10af39f93 Mon Sep 17 00:00:00 2001 From: hazardemircan <33188168+hazardemircan@users.noreply.github.com> Date: Thu, 27 Oct 2022 22:29:51 +0300 Subject: [PATCH] feat: add error & loading page to signup page --- src/components/Authentication/Signup/SignUp.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/Authentication/Signup/SignUp.js b/src/components/Authentication/Signup/SignUp.js index 4feadd7..4375640 100644 --- a/src/components/Authentication/Signup/SignUp.js +++ b/src/components/Authentication/Signup/SignUp.js @@ -23,6 +23,7 @@ import { import { signup } from '../../../config/content'; import REGISTER from '../../../graphql/mutation/register'; import { toErrorMap } from '../../../utils/toErrorMap'; +import { Error, Loader } from '../../marginals'; const FormSignup = () => { const [register, { loading, error }] = useMutation(REGISTER); @@ -99,6 +100,13 @@ const FormSignup = () => { history.push('/journal'); } }; + // Loading and Error component + if (loading) { + return ; + } + if (error) { + return ; + } return (