|
| 1 | +import { |
| 2 | + Grid, |
| 3 | + TextInput, |
| 4 | + Button, |
| 5 | + PasswordInput, |
| 6 | + Divider, |
| 7 | + Text, |
| 8 | + Image, |
| 9 | + useMantineTheme, |
| 10 | + Card, |
| 11 | +} from "@mantine/core"; |
| 12 | + |
| 13 | +import { Link } from "react-router"; |
| 14 | +import Header from "../components/header/header"; |
| 15 | +import logo from "../assets/images/logo.svg"; |
| 16 | +import StatsCard from "../components/statscard"; |
| 17 | +import HistoryTable from "../components/table/table"; |
| 18 | + |
| 19 | +import { useState } from "react"; |
| 20 | + |
| 21 | +export function meta() { |
| 22 | + return [ |
| 23 | + { title: "PeerPrep - Homepage" }, |
| 24 | + { name: "description", content: "Welcome to PeerPrep!" }, |
| 25 | + ]; |
| 26 | +} |
| 27 | + |
| 28 | +export default function Userpage() { |
| 29 | + const theme = useMantineTheme(); |
| 30 | + |
| 31 | + const [data, setData] = useState<any[]>([ |
| 32 | + { |
| 33 | + question: "Two Sum", |
| 34 | + completionDate: "2024-10-01", |
| 35 | + difficulty: "Easy", |
| 36 | + topic: "Array", |
| 37 | + language: "JavaScript", |
| 38 | + }, |
| 39 | + ]); |
| 40 | + |
| 41 | + return ( |
| 42 | + <Grid> |
| 43 | + <Grid.Col span={12}> |
| 44 | + <Grid gutter="md" align="center"> |
| 45 | + <Grid.Col span={{ base: 6, md: 2 }}> |
| 46 | + <StatsCard |
| 47 | + title="Interviews" |
| 48 | + stat="1,234" |
| 49 | + color={theme.colors.gray[0]} |
| 50 | + /> |
| 51 | + </Grid.Col> |
| 52 | + <Grid.Col span={{ base: 6, md: 2 }}> |
| 53 | + <StatsCard |
| 54 | + title="Easy" |
| 55 | + stat="1,234" |
| 56 | + color={theme.colors.green[5]} |
| 57 | + /> |
| 58 | + </Grid.Col> |
| 59 | + <Grid.Col span={{ base: 6, md: 2 }}> |
| 60 | + <StatsCard |
| 61 | + title="Medium" |
| 62 | + stat="1,234" |
| 63 | + color={theme.colors.yellow[5]} |
| 64 | + /> |
| 65 | + </Grid.Col> |
| 66 | + <Grid.Col span={{ base: 6, md: 2 }}> |
| 67 | + <StatsCard title="Hard" stat="1,234" color={theme.colors.red[5]} /> |
| 68 | + </Grid.Col> |
| 69 | + <Grid.Col span={{ base: 12, md: 1 }} offset={{ md: 3 }}> |
| 70 | + <Button fullWidth>Queue Up</Button> |
| 71 | + </Grid.Col> |
| 72 | + </Grid> |
| 73 | + </Grid.Col> |
| 74 | + <Grid.Col span={12}> |
| 75 | + <HistoryTable |
| 76 | + data={data} |
| 77 | + /> |
| 78 | + </Grid.Col> |
| 79 | + </Grid> |
| 80 | + ); |
| 81 | +} |
0 commit comments