diff --git a/src/App.tsx b/src/App.tsx index e346e7f..a735c6b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -53,11 +53,11 @@ function App() { }, { path: "/", - element: , + element: , }, { path: "*", - element: , + element: , }, ]); diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index 37a7d4b..46b3a48 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -1,8 +1,8 @@ -import * as React from "react" -import { Slot } from "@radix-ui/react-slot" -import { cva, type VariantProps } from "class-variance-authority" +import * as React from "react"; +import { Slot } from "@radix-ui/react-slot"; +import { cva, type VariantProps } from "class-variance-authority"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const buttonVariants = cva( "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", @@ -33,8 +33,8 @@ const buttonVariants = cva( variant: "default", size: "default", }, - } -) + }, +); function Button({ className, @@ -44,9 +44,9 @@ function Button({ ...props }: React.ComponentProps<"button"> & VariantProps & { - asChild?: boolean + asChild?: boolean; }) { - const Comp = asChild ? Slot : "button" + const Comp = asChild ? Slot : "button"; return ( - ) + ); } -export { Button, buttonVariants } +export { Button, buttonVariants }; diff --git a/src/components/ui/tabs.tsx b/src/components/ui/tabs.tsx index 9be39fb..0f011c6 100644 --- a/src/components/ui/tabs.tsx +++ b/src/components/ui/tabs.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import * as TabsPrimitive from "@radix-ui/react-tabs"; -import { cn } from "@/lib/utils"; +import { cn } from "../../lib/utils"; function Tabs({ className, diff --git a/src/lib/utils.ts b/src/lib/utils.ts index f17f04c..3c757b0 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -24,7 +24,7 @@ export function formatTimeFilter(time: string) { case "month": return "Month"; case "alltime": - return "All Time"; + return "All"; default: return "Today"; } @@ -32,14 +32,46 @@ export function formatTimeFilter(time: string) { export function getRandomColor() { const colors = [ - "bg-red-700", - "bg-blue-700", - "bg-green-700", - "bg-yellow-700", + "bg-cyan-700", + "bg-lime-600", + "bg-green-500", + "bg-slate-700", + "bg-violet-600", + "bg-sky-500", + "bg-indigo-600", + "bg-gray-400", + "bg-red-500", + "bg-orange-500", + "bg-yellow-500", + "bg-teal-500", + "bg-blue-500", + "bg-purple-500", + "bg-pink-500", + "bg-rose-500", + "bg-amber-500", + "bg-emerald-500", + "bg-fuchsia-500", + "bg-lime-500", + "bg-cyan-500", + "bg-blue-600", + "bg-indigo-700", "bg-purple-700", "bg-pink-700", - "bg-indigo-700", - "bg-gray-700", + "bg-red-600", + "bg-orange-600", + "bg-yellow-600", + "bg-teal-600", + "bg-emerald-600", + "bg-rose-600", + "bg-amber-600", + "bg-fuchsia-600", + "bg-lime-700", + "bg-cyan-600", + "bg-blue-700", + "bg-indigo-800", + "bg-purple-800", + "bg-pink-800", + "bg-red-700", ]; return colors[Math.floor(Math.random() * colors.length)]; } diff --git a/src/pages/auth/Login.tsx b/src/pages/auth/Login.tsx index 89d56b7..a5b07ea 100644 --- a/src/pages/auth/Login.tsx +++ b/src/pages/auth/Login.tsx @@ -23,7 +23,7 @@ export const Login = () => { // Redirect if already authenticated useEffect(() => { if (isAuthenticated) { - navigate("/student", { replace: true }); + navigate("/student/home", { replace: true }); } }, [isAuthenticated, navigate]); @@ -49,8 +49,8 @@ export const Login = () => { return (
-
-
+
+
EdBridge logo {
-
+
@@ -69,8 +66,10 @@ export const Drills = () => {
- Targeted Practice - Focus on what matters + Targeted Practice + + Focus on what matters +
@@ -85,8 +84,10 @@ export const Drills = () => {
- Drills - Train speed and accuracy + Drills + + Train speed and accuracy +
@@ -101,8 +102,10 @@ export const Drills = () => {
- Hard Test Modules - Focus on what matters + Hard Test Modules + + Focus on what matters +
diff --git a/src/pages/student/Home.tsx b/src/pages/student/Home.tsx index 7c7cf4a..0c17df2 100644 --- a/src/pages/student/Home.tsx +++ b/src/pages/student/Home.tsx @@ -79,7 +79,7 @@ export const Home = () => { return (
-
+

Welcome, {user?.name || "Student"}

@@ -87,7 +87,7 @@ export const Home = () => {
@@ -99,28 +99,28 @@ export const Home = () => {
- + All Not Started Completed - +
{practiceSheets.length > 0 ? ( practiceSheets.map((sheet) => ( @@ -152,7 +152,7 @@ export const Home = () => { @@ -168,7 +168,7 @@ export const Home = () => { )}
- +
{notStartedSheets.map((sheet) => ( @@ -197,7 +197,7 @@ export const Home = () => { @@ -206,7 +206,7 @@ export const Home = () => { ))}
- + {completedSheets.length > 0 ? ( completedSheets.map((sheet) => ( @@ -237,7 +237,7 @@ export const Home = () => { @@ -260,7 +260,7 @@ export const Home = () => { SAT Preparation Tips
-
+

Practice regularly with official SAT materials diff --git a/src/pages/student/Lessons.tsx b/src/pages/student/Lessons.tsx index 1ef0b18..c7e506c 100644 --- a/src/pages/student/Lessons.tsx +++ b/src/pages/student/Lessons.tsx @@ -17,7 +17,7 @@ export const Lessons = () => { // const user = useAuthStore((state) => state.user); return ( -

+

Lessons

diff --git a/src/pages/student/Profile.tsx b/src/pages/student/Profile.tsx index 14a448c..cfa6a7f 100644 --- a/src/pages/student/Profile.tsx +++ b/src/pages/student/Profile.tsx @@ -1,26 +1,72 @@ +import { ChevronRight } from "lucide-react"; import { useAuthStore } from "../../stores/authStore"; +import { useNavigate } from "react-router-dom"; export const Profile = () => { const user = useAuthStore((state) => state.user); + const navigate = useNavigate(); + + const handleLogout = () => { + useAuthStore.getState().logout(); + navigate("/login"); + }; return ( -

-
-
-

Profile

-
-

Email: {user?.email}

-

Role: {user?.role}

-

Status: {user?.status}

-

- Member since:{" "} - {user?.joined_at - ? new Date(user.joined_at).toLocaleDateString() - : "N/A"} -

-
+
+

Profile

+
+

{user?.name}

+

{user?.email}

+
+
+
ACCOUNT
+
+ + + +
-
-
+
+
+
LEGAL
+
+ + +
+
+
+
SUPPORT
+
+ +
+
+ +
); }; diff --git a/src/pages/student/Rewards.tsx b/src/pages/student/Rewards.tsx index 1ad9359..d2eb123 100644 --- a/src/pages/student/Rewards.tsx +++ b/src/pages/student/Rewards.tsx @@ -44,7 +44,7 @@ export const Rewards = () => { const trophies = [firstTrophy, secondTrophy, thirdTrophy]; return ( -
+

Leaderboards

diff --git a/src/pages/student/StudentLayout.tsx b/src/pages/student/StudentLayout.tsx index ae96261..0e1d624 100644 --- a/src/pages/student/StudentLayout.tsx +++ b/src/pages/student/StudentLayout.tsx @@ -1,25 +1,7 @@ -import { Outlet, NavLink, useNavigate } from "react-router-dom"; -import { - Home, - BookOpen, - TrendingUp, - Award, - User, - Menu, - Video, -} from "lucide-react"; -import { useAuthStore } from "../../stores/authStore"; +import { Outlet, NavLink } from "react-router-dom"; +import { Home, BookOpen, Award, User, Video } from "lucide-react"; export function StudentLayout() { - // const user = useAuthStore((state) => state.user); - const logout = useAuthStore((state) => state.logout); - const navigate = useNavigate(); - - const handleLogout = () => { - logout(); - navigate("/login"); - }; - const navItems = [ { to: "/student/home", icon: Home, label: "Home" }, { to: "/student/drills", icon: BookOpen, label: "Drills" }, @@ -30,38 +12,13 @@ export function StudentLayout() { return (

- {/* Top Header */} - {/*
-
-
-
- EdBridge logo -
- -
-
-
*/} - {/* Main Content */}
{/* Bottom Tab Navigation */} -