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

@@ -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() {
<SignUpSuccess />
</Route>
<Route exact path={Paths.AuthorizedTest}>
<AuthGuard>
{/* protected page */}
<AuthGuard>
<Route exact path={Paths.AuthorizedTest}>
<AuthorizedTest />
</AuthGuard>
</Route>
</Route>
<Route exact path={Paths.StudentInfo}>
<StudentInfo />
</Route>
</AuthGuard>
{/* TODO: remove below */}
<Route exact path="/tab1">