Practice
+Drills
Email: {user?.email}
Role: {user?.role}
diff --git a/src/pages/student/Home.tsx b/src/pages/student/Home.tsx index a53656d..84eae68 100644 --- a/src/pages/student/Home.tsx +++ b/src/pages/student/Home.tsx @@ -6,11 +6,10 @@ import { TabsContent, } from "../../components/ui/tabs"; import { useAuthStore } from "../../stores/authStore"; -import { Search } from "lucide-react"; +import { CheckCircle, Search } from "lucide-react"; import { api } from "../../utils/api"; import { Card, - CardAction, CardContent, CardDescription, CardFooter, @@ -19,13 +18,19 @@ import { } from "../../components/ui/card"; import { Badge } from "../../components/ui/badge"; import { Button } from "../../components/ui/button"; +import type { PracticeSheet } from "../../types/sheet"; export const Home = () => { const user = useAuthStore((state) => state.user); - const [practiceSheets, setPracticeSheets] = useState([]); + // const logout = useAuthStore((state) => state.logout); // const navigate = useNavigate(); + const [practiceSheets, setPracticeSheets] = useStateWelcome, {user?.name || "Student"}
-+ Not Started +
++ {sheet?.time_limit} minutes +
++ No Practice Sheets available. +
+Not Started
-In Progress
+ {inProgressSheets.map((sheet) => ( +Not Started
++ {sheet?.time_limit} minutes +
+Completed
+ {completedSheets.map((sheet) => ( +Not Started
++ {sheet?.time_limit} minutes +
++ SAT Preparation Tips +
++ Practice regularly with official SAT materials +
++ Review your mistakes and learn from them +
+Focus on your weak areas
++ Take full-length practice tests +
++ Get plenty of rest before the test day +
+Progress
+Lessons
Email: {user?.email}
Role: {user?.role}
diff --git a/src/pages/student/StudentLayout.tsx b/src/pages/student/StudentLayout.tsx index bf82d12..f847fed 100644 --- a/src/pages/student/StudentLayout.tsx +++ b/src/pages/student/StudentLayout.tsx @@ -1,5 +1,13 @@ import { Outlet, NavLink, useNavigate } from "react-router-dom"; -import { Home, BookOpen, TrendingUp, Award, User, Menu } from "lucide-react"; +import { + Home, + BookOpen, + TrendingUp, + Award, + User, + Menu, + Video, +} from "lucide-react"; import { useAuthStore } from "../../stores/authStore"; export function StudentLayout() { @@ -14,8 +22,8 @@ export function StudentLayout() { const navItems = [ { to: "/student/home", icon: Home, label: "Home" }, - { to: "/student/practice", icon: BookOpen, label: "Practice" }, - { to: "/student/progress", icon: TrendingUp, label: "Progress" }, + { to: "/student/drills", icon: BookOpen, label: "Drills" }, + { to: "/student/lessons", icon: Video, label: "Lessons" }, { to: "/student/rewards", icon: Award, label: "Rewards" }, { to: "/student/profile", icon: User, label: "Profile" }, ]; diff --git a/src/types/sheet.ts b/src/types/sheet.ts new file mode 100644 index 0000000..317ab56 --- /dev/null +++ b/src/types/sheet.ts @@ -0,0 +1,23 @@ +interface CreatedBy { + id: string; + name: string; + email: string; +} + +export interface PracticeSheet { + title: string; + difficulty: string; + time_limit: number; + description: string; + is_locked: boolean; + id: string; + created_by_id: string; + created_at: string; + updated_at: string; + questions_count: number; + topics: string[]; + created_by: CreatedBy; + modules: string[]; + user_status: string; + modules_count: number; +} diff --git a/src/types/testdate.ts b/src/types/testdate.ts new file mode 100644 index 0000000..262e3b9 --- /dev/null +++ b/src/types/testdate.ts @@ -0,0 +1,11 @@ +import type { ReactNode } from "react"; + +export interface TestDate { + action: ReactNode; + test_date: string; + registration_deadline: string; + late_registration_deadline: string; + location: string; + is_digital: boolean; + id: string; +} diff --git a/src/utils/api.ts b/src/utils/api.ts index d93b9b8..8afb9b5 100644 --- a/src/utils/api.ts +++ b/src/utils/api.ts @@ -1,4 +1,4 @@ -const API_URL = "https://dsat-api.edbridgescholars.com"; +const API_URL = "https://ed-dev-api.omukk.dev"; export interface LoginRequest { email: string; @@ -27,25 +27,6 @@ export interface ApiError { message?: string; } -export interface PracticeSheet { - title: string; - subject: string; - difficulty: string; - time_limit: number; - description: string; - topics: string[]; - is_locked: boolean; - id: string; - created_at: string; - created_by: { - id: string; - name: string; - email: string; - }; - modules: string[]; - modules_count: number; -} - class ApiClient { private baseURL: string; @@ -128,6 +109,10 @@ class ApiClient { token ); } + + async getSatDates(token: string): Promise