add new student info route and related components, update auth guard implementation and signup success redirect
```
This commit is contained in:
louiscklaw
2025-05-14 15:40:59 +08:00
parent 1938e95948
commit efc2d31f7c
6 changed files with 98 additions and 21 deletions

View File

@@ -0,0 +1,59 @@
import {
IonBackButton,
IonButton,
IonButtons,
IonCardTitle,
IonCol,
IonContent,
IonFooter,
IonGrid,
IonHeader,
IonIcon,
IonInput,
IonLabel,
IonPage,
IonRow,
IonText,
IonToolbar,
useIonRouter,
} from '@ionic/react';
import styles from './style.module.scss';
import _ from 'lodash';
import { Router, useParams } from 'react-router';
import { Wave } from '../../../components/Wave';
import { Paths } from '../../../Paths';
function StudentInfo(): React.JSX.Element {
const router = useIonRouter();
const { id } = useParams();
function handleBackToLogin() {
router.push(Paths.AuthLogin);
}
return (
<IonPage className={styles.loginPage}>
<IonHeader>{/* */}</IonHeader>
{/* */}
<IonContent fullscreen>
<IonGrid className="ion-padding">
<IonCol>
<IonRow>
<IonText>Student Info test</IonText>
<IonText>{JSON.stringify({ id })}</IonText>
</IonRow>
<IonRow>
<IonButton onClick={handleBackToLogin}>Back to login</IonButton>
</IonRow>
</IonCol>
</IonGrid>
</IonContent>
{/* */}
<IonFooter>
<IonGrid className="ion-no-margin ion-no-padding">
<Wave />
</IonGrid>
</IonFooter>
</IonPage>
);
}
export default StudentInfo;