feat(pages): add drills page
This commit is contained in:
@ -1,26 +1,117 @@
|
|||||||
|
import {
|
||||||
|
BookOpen,
|
||||||
|
Clock,
|
||||||
|
DraftingCompass,
|
||||||
|
Loader2,
|
||||||
|
Target,
|
||||||
|
Trophy,
|
||||||
|
Zap,
|
||||||
|
} from "lucide-react";
|
||||||
import { useAuthStore } from "../../stores/authStore";
|
import { useAuthStore } from "../../stores/authStore";
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardAction,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardFooter,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "../../components/ui/card";
|
||||||
|
import { Button } from "../../components/ui/button";
|
||||||
|
|
||||||
export const Drills = () => {
|
export const Drills = () => {
|
||||||
const user = useAuthStore((state) => state.user);
|
const user = useAuthStore((state) => state.user);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gray-50">
|
<main className="min-h-screen max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-4">
|
||||||
<main className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
<header className="flex justify-between items-center">
|
||||||
<div className="bg-white rounded-lg shadow p-6">
|
<div className="w-fit bg-linear-to-br from-purple-500 to-purple-600 p-3 rounded-2xl">
|
||||||
<h2 className="text-2xl font-bold text-gray-800 mb-4">Drills</h2>
|
<BookOpen size={20} color="white" />
|
||||||
<div className="space-y-2 text-gray-600">
|
</div>
|
||||||
<p>Email: {user?.email}</p>
|
<div className="bg-purple-100 rounded-full w-fit py-2 px-4 flex items-center gap-2">
|
||||||
<p>Role: {user?.role}</p>
|
<div className="h-2 w-2 bg-linear-to-br from-purple-400 to-purple-500 rounded-full"></div>
|
||||||
<p>Status: {user?.status}</p>
|
<span className="font-satoshi-bold text-md">0</span>
|
||||||
<p>
|
</div>
|
||||||
Member since:{" "}
|
</header>
|
||||||
{user?.joined_at
|
<section>
|
||||||
? new Date(user.joined_at).toLocaleDateString()
|
<Card
|
||||||
: "N/A"}
|
className="relative bg-linear-to-br from-purple-500 to-purple-600 rounded-4xl
|
||||||
|
flex-row"
|
||||||
|
>
|
||||||
|
<div className="space-y-4">
|
||||||
|
<CardHeader className="w-1/2">
|
||||||
|
<CardTitle className="font-satoshi-bold tracking-tight text-3xl text-white">
|
||||||
|
See where you stand
|
||||||
|
</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
|
||||||
|
<CardContent className="w-2/3">
|
||||||
|
<p className="font-satoshi text-white">
|
||||||
|
Test your knowledge with an adaptive practice test.
|
||||||
</p>
|
</p>
|
||||||
|
</CardContent>
|
||||||
|
<CardFooter>
|
||||||
|
<Button className="bg-gray-50 drop-shadow-xl p-6 text-md font-satoshi text-black rounded-full">
|
||||||
|
Take a practice test
|
||||||
|
</Button>
|
||||||
|
</CardFooter>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="overflow-hidden opacity-30 -rotate-45 absolute -top-10 -right-20">
|
||||||
|
<DraftingCompass size={300} color="white" />
|
||||||
</div>
|
</div>
|
||||||
|
</Card>
|
||||||
|
</section>
|
||||||
|
<section className="flex flex-col gap-6">
|
||||||
|
<h1 className="font-satoshi-black text-2xl">Practice your way</h1>
|
||||||
|
<Card className="rounded-4xl">
|
||||||
|
<CardHeader className="space-y-3">
|
||||||
|
<div className="w-fit bg-linear-to-br from-red-400 to-red-500 p-3 rounded-2xl">
|
||||||
|
<Target size={20} color="white" />
|
||||||
|
</div>
|
||||||
|
<div className="space-y-2">
|
||||||
|
<CardTitle>Targeted Practice</CardTitle>
|
||||||
|
<CardDescription>Focus on what matters</CardDescription>
|
||||||
|
</div>
|
||||||
|
<CardAction>
|
||||||
|
<div className="w-fit bg-red-100 p-2 rounded-full">
|
||||||
|
<Loader2 size={30} color="#fa6969" />
|
||||||
|
</div>
|
||||||
|
</CardAction>
|
||||||
|
</CardHeader>
|
||||||
|
</Card>
|
||||||
|
<Card className="rounded-4xl">
|
||||||
|
<CardHeader className="space-y-3">
|
||||||
|
<div className="w-fit bg-linear-to-br from-cyan-400 to-cyan-500 p-3 rounded-2xl">
|
||||||
|
<Zap size={20} color="white" />
|
||||||
|
</div>
|
||||||
|
<div className="space-y-2">
|
||||||
|
<CardTitle>Drills</CardTitle>
|
||||||
|
<CardDescription>Train speed and accuracy</CardDescription>
|
||||||
|
</div>
|
||||||
|
<CardAction>
|
||||||
|
<div className="w-fit bg-cyan-100 p-3 rounded-full">
|
||||||
|
<Clock size={26} color="oklch(71.5% 0.143 215.221)" />
|
||||||
|
</div>
|
||||||
|
</CardAction>
|
||||||
|
</CardHeader>
|
||||||
|
</Card>
|
||||||
|
<Card className="rounded-4xl">
|
||||||
|
<CardHeader className="space-y-3">
|
||||||
|
<div className="w-fit bg-linear-to-br from-lime-400 to-lime-500 p-3 rounded-2xl">
|
||||||
|
<Trophy size={20} color="white" />
|
||||||
|
</div>
|
||||||
|
<div className="space-y-2">
|
||||||
|
<CardTitle>Hard Test Modules</CardTitle>
|
||||||
|
<CardDescription>Focus on what matters</CardDescription>
|
||||||
|
</div>
|
||||||
|
<CardAction>
|
||||||
|
<div className="w-fit bg-lime-100 p-3 rounded-full">
|
||||||
|
<BookOpen size={26} color="oklch(76.8% 0.233 130.85)" />
|
||||||
|
</div>
|
||||||
|
</CardAction>
|
||||||
|
</CardHeader>
|
||||||
|
</Card>
|
||||||
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -31,7 +31,7 @@ export function StudentLayout() {
|
|||||||
return (
|
return (
|
||||||
<div className="flex flex-col min-h-screen bg-gray-50">
|
<div className="flex flex-col min-h-screen bg-gray-50">
|
||||||
{/* Top Header */}
|
{/* Top Header */}
|
||||||
<header className="bg-white shadow-sm sticky top-0 z-10">
|
{/* <header className="bg-white shadow-sm sticky top-0 z-10">
|
||||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
<div className="flex justify-between items-center h-22">
|
<div className="flex justify-between items-center h-22">
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
@ -53,7 +53,7 @@ export function StudentLayout() {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header> */}
|
||||||
|
|
||||||
{/* Main Content */}
|
{/* Main Content */}
|
||||||
<main className="flex-1 pb-20 overflow-y-auto">
|
<main className="flex-1 pb-20 overflow-y-auto">
|
||||||
|
|||||||
Reference in New Issue
Block a user