From e34782844ed194b561fe02cc221bc3e5bfaa24ba Mon Sep 17 00:00:00 2001 From: louiscklaw Date: Thu, 15 May 2025 09:19:59 +0800 Subject: [PATCH] ``` add user profile navigation logic and update button in SettingContainer ``` --- .../src/components/SettingContainer/index.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/002_source/ionic_mobile/src/components/SettingContainer/index.tsx b/002_source/ionic_mobile/src/components/SettingContainer/index.tsx index cfe16d0..678c3a8 100644 --- a/002_source/ionic_mobile/src/components/SettingContainer/index.tsx +++ b/002_source/ionic_mobile/src/components/SettingContainer/index.tsx @@ -3,6 +3,7 @@ import { arrowBack } from 'ionicons/icons'; import { LESSON_LINK, VERSIONS } from '../../constants'; import SettingSvg from './image.svg'; import { Paths } from '../../Paths'; +import { pb } from '../../lib/pb'; interface ContainerProps { name: string; @@ -15,6 +16,14 @@ const SettingContainer: React.FC = ({ name }) => { router.push(Paths.AuthHome); } + function handleUserProfileClick() { + if (pb.authStore.record?.id) { + router.push(Paths.GetStudentInfoLink(pb.authStore.record.id)); + } else { + router.push(Paths.AuthLogin); + } + } + return (
= ({ name }) => {

T.B.A.

{VERSIONS}
- AuthHome + User Profile { router.push(LESSON_LINK, undefined, 'replace');