diff --git a/.gitignore b/.gitignore index 5c6f0f2..dbb0fb0 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ # next.js /.next/ /out/ +android # production /build diff --git a/app/(tabs)/bookmark/page.tsx b/app/(tabs)/bookmark/page.tsx index 56edba1..668e372 100644 --- a/app/(tabs)/bookmark/page.tsx +++ b/app/(tabs)/bookmark/page.tsx @@ -1,64 +1,64 @@ "use client"; -import React, { useState, useEffect } from "react"; +import React from "react"; import BackgroundWrapper from "@/components/BackgroundWrapper"; -import { Bookmark, BookmarkCheck, ListFilter, MoveLeft } from "lucide-react"; +import { ListFilter, MoveLeft } from "lucide-react"; import { useRouter } from "next/navigation"; import DestructibleAlert from "@/components/DestructibleAlert"; -interface Question { - id: number; - question: string; - options: Record; -} +// interface Question { +// id: number; +// question: string; +// options: Record; +// } -interface QuestionItemProps { - question: Question; -} +// interface QuestionItemProps { +// question: Question; +// } -const QuestionItem = ({ question }: QuestionItemProps) => { - const [bookmark, setBookmark] = useState(true); - return ( -
-

- {question.id + 1}. {question.question} -

-
-
- -
-
- {Object.entries(question.options).map(([key, value]) => { - return ( -
- - {key.toUpperCase()} - - {value} -
- ); - })} -
-
- ); -}; +// const QuestionItem = ({ question }: QuestionItemProps) => { +// const [bookmark, setBookmark] = useState(true); +// return ( +//
+//

+// {question.id + 1}. {question.question} +//

+//
+//
+// +//
+//
+// {Object.entries(question.options).map(([key, value]) => { +// return ( +//
+// +// {key.toUpperCase()} +// +// {value} +//
+// ); +// })} +//
+//
+// ); +// }; const BookmarkPage = () => { const router = useRouter(); - const [questions, setQuestions] = useState([]); + // const [questions, setQuestions] = useState([]); - useEffect(() => { - fetch("/data/bookmark.json") - .then((res) => res.json()) - .then((data) => setQuestions(data)) - .catch((err) => console.error("Error loading questions: ", err)); - }, []); + // useEffect(() => { + // fetch("/data/bookmark.json") + // .then((res) => res.json()) + // .then((data) => setQuestions(data)) + // .catch((err) => console.error("Error loading questions: ", err)); + // }, []); return ( diff --git a/app/(tabs)/categories/subjects/page.tsx b/app/(tabs)/categories/subjects/page.tsx index 3bc09c6..80c7591 100644 --- a/app/(tabs)/categories/subjects/page.tsx +++ b/app/(tabs)/categories/subjects/page.tsx @@ -6,7 +6,7 @@ import Header from "@/components/Header"; import DestructibleAlert from "@/components/DestructibleAlert"; import BackgroundWrapper from "@/components/BackgroundWrapper"; import { API_URL, getToken } from "@/lib/auth"; -import { Loader, RefreshCw, Star, StarHalf } from "lucide-react"; +import { Loader, RefreshCw } from "lucide-react"; import { useAuthStore } from "@/stores/authStore"; import { FaStar } from "react-icons/fa"; diff --git a/app/(tabs)/layout.tsx b/app/(tabs)/layout.tsx index 4fddfb6..4cf8b31 100644 --- a/app/(tabs)/layout.tsx +++ b/app/(tabs)/layout.tsx @@ -17,7 +17,7 @@ const tabs = [ href: "/categories", component: , }, - { name: "Bookmark", href: "/bookmark", component: }, + { name: "Bookmark", href: "/bookmark", component: }, { name: "Settings", href: "/settings", component: }, ]; diff --git a/app/(tabs)/settings/page.tsx b/app/(tabs)/settings/page.tsx index 1e1fdd7..87bd45e 100644 --- a/app/(tabs)/settings/page.tsx +++ b/app/(tabs)/settings/page.tsx @@ -44,35 +44,39 @@ const SettingsPage = () => { -
-
- - - {user?.username - ? user.username.charAt(0).toUpperCase() - : ""} - - -
-

{user?.full_name}

-

{user?.email}

-
+
+ + + {user?.username + ? user.username.charAt(0).toUpperCase() + : "User"} + + +
+

+ {user?.full_name} +

+

{user?.email}

- -
+ {!user?.is_verified && ( + <> + +
+ + )} - - {displayTabTitle} - +
+
+ + + {displayTabTitle} + +
)} diff --git a/package.json b/package.json index 1012cc3..d783522 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "dev": "next dev --turbopack", "build": "next build ", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "build:export": "npx next build && npm run export" }, "dependencies": { "@capacitor/android": "^7.4.2",