fix typo,

This commit is contained in:
louiscklaw
2025-05-14 16:25:57 +08:00
parent 628c72190b
commit 0aefbfaeae

View File

@@ -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'}>