Skip to content

Commit d08165f

Browse files
committed
Fix lint
1 parent c579a94 commit d08165f

File tree

4 files changed

+14
-19
lines changed

4 files changed

+14
-19
lines changed

frontend/peerprep/app/components/header/header.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
// With reference from official Mantine documentation
22
// https://ui.mantine.dev/category/headers/
33

4-
import { Burger, Container, Group, Text } from "@mantine/core";
5-
import { useDisclosure } from "@mantine/hooks";
4+
import { Container, Group, Text } from "@mantine/core";
65
import { useNavigate } from "react-router";
76
import classes from "./header.module.css";
87
import logo from "../../assets/images/logo.svg";
98

10-
const links = [{ link: "/user", label: "Home" }];
11-
129
export default function Header() {
13-
const [opened, { toggle }] = useDisclosure(false);
1410
const navigate = useNavigate();
1511

1612
return (

frontend/peerprep/app/components/table/table.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
import { Button, Card, Divider, Table, Text, Pagination, Group } from "@mantine/core";
22
import classes from "./table.module.css";
33

4-
export default function HistoryTable({ data }: { data: any[] }) {
5-
const rows = data.map((row, index) => (
6-
<Table.Tr key={row.name}>
4+
export type InterviewHistory = {
5+
question: string;
6+
completionDate: string;
7+
difficulty: string;
8+
topic: string;
9+
language: string;
10+
};
11+
12+
export default function HistoryTable({ data }: { data: InterviewHistory[] }) {
13+
const rows = data.map((row) => (
14+
<Table.Tr key={row.question}>
715
<Table.Td>{row.question}</Table.Td>
816
<Table.Td ta="right">{row.completionDate}</Table.Td>
917
<Table.Td ta="right">{row.difficulty}</Table.Td>

frontend/peerprep/app/pages/userpage.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
import {
22
Grid,
3-
TextInput,
43
Button,
5-
PasswordInput,
6-
Divider,
7-
Text,
8-
Image,
94
useMantineTheme,
10-
Card,
115
} from "@mantine/core";
126

13-
import { Link } from "react-router";
14-
import Header from "../components/header/header";
15-
import logo from "../assets/images/logo.svg";
167
import StatsCard from "../components/statscard";
178
import HistoryTable from "../components/table/table";
9+
import type {InterviewHistory} from "../components/table/table";
1810

1911
import { useState } from "react";
2012

@@ -28,7 +20,7 @@ export function meta() {
2820
export default function Userpage() {
2921
const theme = useMantineTheme();
3022

31-
const [data, setData] = useState<any[]>([
23+
const [data, ] = useState<InterviewHistory[]>([
3224
{
3325
question: "Two Sum",
3426
completionDate: "2024-10-01",

frontend/peerprep/app/root.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
Container,
1616
Button,
1717
Input,
18-
Card,
1918
} from "@mantine/core";
2019

2120
import type { Route } from "./+types/root";

0 commit comments

Comments
 (0)