validate otp

This commit is contained in:
Muhammad Fajar
2022-11-11 15:38:07 +07:00
parent 3e30ce6e90
commit 91e44fcb41
14 changed files with 157 additions and 529 deletions

View File

@@ -2,8 +2,6 @@ import { useState, ReactNode } from 'react';
import { Navigate, useLocation } from 'react-router-dom';
// hooks
import useAuth from '../hooks/useAuth';
// pages
import Login from '../pages/auth/Login';
// components
import LoadingScreen from '../components/LoadingScreen';
@@ -26,7 +24,7 @@ export default function AuthGuard({ children }: AuthGuardProps) {
if (pathname !== requestedLocation) {
setRequestedLocation(pathname);
}
return <Navigate to="/auth/login" replace={true}/>;
return <Navigate to="/auth/login" replace={true} />;
}
if (requestedLocation && pathname !== requestedLocation) {