fix typo,
This commit is contained in:
@@ -11,15 +11,39 @@ import {
|
||||
IonRouterLink,
|
||||
IonRow,
|
||||
IonToolbar,
|
||||
useIonRouter,
|
||||
} from '@ionic/react';
|
||||
// import { Action } from '../components/Action';
|
||||
import styles from './style.module.scss';
|
||||
import { Action } from '../../../components/Action';
|
||||
import { Paths } from '../../../Paths';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useUser } from '../../../hooks/use-user';
|
||||
|
||||
const AuthHome = () => {
|
||||
const { t } = useTranslation();
|
||||
const { user } = useUser();
|
||||
const router = useIonRouter();
|
||||
|
||||
const [showLoading, setShowLoading] = useState<boolean>(true);
|
||||
const [showError, setShowErrr] = useState<{ show: boolean; message: string }>({
|
||||
show: false,
|
||||
message: '',
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (!user) {
|
||||
} else {
|
||||
if (user?.id) {
|
||||
router.push(Paths.AuthorizedTest);
|
||||
}
|
||||
}
|
||||
setShowLoading(false);
|
||||
}, []);
|
||||
|
||||
if (showLoading) return <>loading</>;
|
||||
if (showError) return <>{showError.message}</>;
|
||||
|
||||
return (
|
||||
<IonPage className={'styles.homePage'}>
|
||||
|
Reference in New Issue
Block a user