diff --git a/002_source/ionic_mobile/src/Paths.tsx b/002_source/ionic_mobile/src/Paths.tsx
index a50a8c0..e11d0fa 100644
--- a/002_source/ionic_mobile/src/Paths.tsx
+++ b/002_source/ionic_mobile/src/Paths.tsx
@@ -1,9 +1,13 @@
const Paths = {
- AuthHome: `/auth/Home`,
+ AuthHome: `/auth/home`,
AuthLogin: `/auth/login`,
AuthSignUp: `/auth/signup`,
SignUpSuccess: `/auth/sign_up_success`,
AuthorizedTest: `/auth/authorized_test`,
+ //
+ StudentInfo: `/auth/student_info/:id`,
+ GetStudentInfoLink: (id: string) => `/auth/student_info/${id}`,
+ //
};
export { Paths };
diff --git a/002_source/ionic_mobile/src/RouteConfig.tsx b/002_source/ionic_mobile/src/RouteConfig.tsx
index 2438661..c119655 100644
--- a/002_source/ionic_mobile/src/RouteConfig.tsx
+++ b/002_source/ionic_mobile/src/RouteConfig.tsx
@@ -52,7 +52,9 @@ import Tab3 from './pages/Tab3';
import { Paths } from './Paths';
import SignUpSuccess from './pages/auth/SignUpSuccess';
import AuthorizedTest from './pages/auth/AuthorizedTest';
-import { AuthGuard } from './pages/auth/AuthorizedTest/auth-guard';
+import { AuthGuard } from './components/auth/auth-guard';
+import StudentInfo from './pages/auth/StudentInfo';
+// import { AuthGuard } from './pages/auth/AuthorizedTest/auth-guard';
// import WordPageWithLayout from './pages/Lesson/WordPageWithLayout.del';
function RouteConfig() {
@@ -180,11 +182,15 @@ function RouteConfig() {
-
-
+ {/* protected page */}
+
+
-
-
+
+
+
+
+
{/* TODO: remove below */}
diff --git a/002_source/ionic_mobile/src/pages/auth/AuthorizedTest/auth-guard.tsx b/002_source/ionic_mobile/src/components/auth/auth-guard.tsx
similarity index 93%
rename from 002_source/ionic_mobile/src/pages/auth/AuthorizedTest/auth-guard.tsx
rename to 002_source/ionic_mobile/src/components/auth/auth-guard.tsx
index 3b3beec..385e0a2 100644
--- a/002_source/ionic_mobile/src/pages/auth/AuthorizedTest/auth-guard.tsx
+++ b/002_source/ionic_mobile/src/components/auth/auth-guard.tsx
@@ -1,8 +1,8 @@
import { useIonRouter } from '@ionic/react';
import * as React from 'react';
import { IonAlert, IonButton } from '@ionic/react';
-import { useUser } from '../../../hooks/use-user';
-import { Paths } from '../../../Paths';
+import { useUser } from '../../hooks/use-user';
+import { Paths } from '../../Paths';
export interface AuthGuardProps {
children: React.ReactNode;
diff --git a/002_source/ionic_mobile/src/pages/auth/SignUp/index.tsx b/002_source/ionic_mobile/src/pages/auth/SignUp/index.tsx
index 91225cb..b2bde25 100644
--- a/002_source/ionic_mobile/src/pages/auth/SignUp/index.tsx
+++ b/002_source/ionic_mobile/src/pages/auth/SignUp/index.tsx
@@ -38,6 +38,7 @@ import { z as zod } from 'zod';
import { pb } from '../../../lib/pb';
import { ClientResponseError } from 'pocketbase';
import { COL_USER_METAS, COL_USERS } from '../../../constants';
+import { Paths } from '../../../Paths';
function AuthSignUp(): React.JSX.Element {
const params = useParams();
@@ -109,6 +110,8 @@ function AuthSignUp(): React.JSX.Element {
};
const userMetaRecord = await pb.collection(COL_USER_METAS).create(userMeta);
await pb.collection('users').requestVerification(user.email);
+
+ router.push(Paths.SignUpSuccess);
} catch (err: any) {
const res_err = err as unknown as ClientResponseError;
const {
@@ -133,19 +136,7 @@ function AuthSignUp(): React.JSX.Element {
return (
-
-
-
-
-
-
-
-
-
-
-
-
-
+
{/* */}