From c87357ff24bb58844b9ad893b277caafb4c8b83b Mon Sep 17 00:00:00 2001 From: louiscklaw Date: Fri, 16 May 2025 15:55:30 +0800 Subject: [PATCH] ```update Remove unused import path suffix and comment out unused useRequireAuth hook``` --- .../useListQuizListeningPracticeContent.tsx | 4 ++-- .../ionic_mobile/src/hooks/usePocketBase.tsx | 20 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/002_source/ionic_mobile/src/hooks/useListQuizListeningPracticeContent.tsx b/002_source/ionic_mobile/src/hooks/useListQuizListeningPracticeContent.tsx index 77ced27..f390af9 100644 --- a/002_source/ionic_mobile/src/hooks/useListQuizListeningPracticeContent.tsx +++ b/002_source/ionic_mobile/src/hooks/useListQuizListeningPracticeContent.tsx @@ -1,6 +1,6 @@ -import { usePocketBase } from './usePocketBase.tsx'; +import { usePocketBase } from './usePocketBase'; import { useQuery } from '@tanstack/react-query'; -import IListeningPracticeCategory from '../interfaces/IListeningPracticeCategory.tsx'; +import IListeningPracticeCategory from '../interfaces/IListeningPracticeCategory'; const useListQuizListeningPracticeContent = () => { const { user, pb } = usePocketBase(); diff --git a/002_source/ionic_mobile/src/hooks/usePocketBase.tsx b/002_source/ionic_mobile/src/hooks/usePocketBase.tsx index 85a48ab..c856f89 100644 --- a/002_source/ionic_mobile/src/hooks/usePocketBase.tsx +++ b/002_source/ionic_mobile/src/hooks/usePocketBase.tsx @@ -36,15 +36,15 @@ export const usePocketBase = () => { return context; }; -export const useRequireAuth = () => { - const { pb, user } = usePocketBase(); - const navigate = useNavigate(); +// export const useRequireAuth = () => { +// const { pb, user } = usePocketBase(); +// const navigate = useNavigate(); - useEffect(() => { - if (!pb.authStore.isValid) { - navigate(URLS.LOGIN); - } - }, [pb.authStore.isValid, navigate]); +// useEffect(() => { +// if (!pb.authStore.isValid) { +// navigate(URLS.LOGIN); +// } +// }, [pb.authStore.isValid, navigate]); - return user; -}; +// return user; +// };