Skip to content

Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.

Remove unused components

Khuram Niaz1f718fa9b6eb
diff --git a/src/components/ModeToggle.tsx b/src/components/ModeToggle.tsx
deleted file mode 100644
index 9264016..0000000
--- a/src/components/ModeToggle.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-"use client";
-
-import * as React from "react";
-import { Moon, Sun } from "lucide-react";
-import { useTheme } from "next-themes";
-
-import { Button } from "@/components/ui/button";
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuTrigger,
-} from "@/components/ui/dropdown-menu";
-
-export function ModeToggle() {
- const { setTheme } = useTheme();
-
- return (
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <Button variant="outline" size="icon">
- <Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
- <Moon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
- <span className="sr-only">Toggle theme</span>
- </Button>
- </DropdownMenuTrigger>
- <DropdownMenuContent align="end">
- <DropdownMenuItem onClick={() => setTheme("light")}>
- Light
- </DropdownMenuItem>
- <DropdownMenuItem onClick={() => setTheme("dark")}>
- Dark
- </DropdownMenuItem>
- <DropdownMenuItem onClick={() => setTheme("system")}>
- System
- </DropdownMenuItem>
- </DropdownMenuContent>
- </DropdownMenu>
- );
-}
diff --git a/src/components/RadialChartSekeleton.tsx b/src/components/RadialChartSekeleton.tsx
deleted file mode 100644
index f9369f1..0000000
--- a/src/components/RadialChartSekeleton.tsx
+++ /dev/null
@@ -1,81 +0,0 @@
-import React from "react";
-
-export const RadialChartSekeleton = () => {
- return (
- <div className="relative cursor-default w-full h-full max-h-[180px] max-w-[180px] flex items-center justify-center">
- <div className="absolute inset-0 flex items-center justify-center">
- <div className="w-6 h-6 border-4 border-t-4 border-gray-300 border-t-gray-500 rounded-full animate-spin"></div>
- </div>
- <svg
- cx="50%"
- cy="50%"
- className="w-full h-full"
- width="180"
- height="180"
- viewBox="0 0 180 180"
- >
- <defs>
- <clipPath id="recharts4-clip">
- <rect x="5" y="5" height="170" width="170"></rect>
- </clipPath>
- </defs>
- <g className="recharts-layer recharts-polar-radius-axis radiusAxis">
- <text x="90" y="90" textAnchor="middle">
- <tspan
- x="90"
- y="74"
- className="fill-gray-300 text-2xl font-bold animate-pulse"
- >
- -
- </tspan>
- <tspan x="90" y="94" className="fill-gray-400 animate-pulse">
- Score
- </tspan>
- </text>
- </g>
- <g className="recharts-layer recharts-area stroke-transparent stroke-2">
- <g className="recharts-layer recharts-radial-bar-sectors">
- <g className="recharts-layer">
- <path
- cx="90"
- cy="90"
- fill="var(--color-improve)"
- className="fill-gray-300 animate-pulse"
- d="M 174.8528137423857,90
- A5,5,0,0,0,179.8441557272319,84.70588235294117
- A90,90,0,0,0,157.27291825334055,30.21409472392879
- A5,5,0,0,0,150,30
- L142.9150262212918,37.08497377870819
- A5,5,0,0,0,142.68718945207627,43.9124738389982
- A70,70,0,0,1,159.84427121978024,85.33333333333333
- A5,5,0,0,0,164.83314773547883,90Z"
- role="img"
- ></path>
- </g>
- </g>
- </g>
- <g className="recharts-layer recharts-area stroke-transparent stroke-2">
- <g className="recharts-layer recharts-radial-bar-sectors">
- <g className="recharts-layer">
- <path
- cx="90"
- cy="90"
- fill="var(--color-score)"
- className="fill-gray-400 animate-pulse"
- d="M 150,30
- A5,5,0,0,0,149.78590527607122,22.72708174665945
- A90,90,0,0,0,0.15584427276807844,84.7058823529412
- A5,5,0,0,0,5.147186257614294,89.99999999999999
- L15.166852264521168,89.99999999999999
- A5,5,0,0,0,20.15572878021976,85.33333333333331
- A70,70,0,0,1,136.0875261610018,37.31281054792375
- A5,5,0,0,0,142.9150262212918,37.08497377870819Z"
- role="img"
- ></path>
- </g>
- </g>
- </g>
- </svg>
- </div>
- );
-};
diff --git a/src/components/TablePagination.tsx b/src/components/TablePagination.tsx
deleted file mode 100644
index b054fce..0000000
--- a/src/components/TablePagination.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-import {
- Pagination,
- PaginationContent,
- PaginationEllipsis,
- PaginationItem,
- PaginationLink,
- PaginationNext,
- PaginationPrevious,
-} from "@/components/ui/pagination";
-import { cn } from "@/lib/utils";
-
-type PaginationProps = {
- currentPage: number;
- totalPages: number;
- onPageChange: (n: number) => void;
-};
-
-export function TablePagination({
- currentPage,
- totalPages,
- onPageChange,
-}: PaginationProps) {
- const pages = Array.from({ length: totalPages }, (_, i) => i + 1);
- const nextDisabled = currentPage === totalPages;
- const prevDisabled = currentPage === 1;
-
- return (
- <Pagination>
- <PaginationContent>
- <PaginationItem>
- <PaginationPrevious
- onClick={() => {
- if (!prevDisabled) {
- onPageChange(currentPage - 1);
- }
- }}
- className={cn(
- "cursor-pointer",
- prevDisabled && "cursor-default text-muted-foreground"
- )}
- />
- </PaginationItem>
- {pages.map((page) => {
- return (
- <PaginationItem key={page}>
- <PaginationLink
- onClick={() => onPageChange(page)}
- className={page === currentPage ? "active" : ""}
- >
- {page}
- </PaginationLink>
- </PaginationItem>
- );
- })}
- {/* <PaginationItem>
- <PaginationEllipsis />
- </PaginationItem> */}
- <PaginationItem>
- <PaginationNext
- onClick={() => {
- if (!nextDisabled) {
- onPageChange(currentPage + 1);
- }
- }}
- className={cn(
- "cursor-pointer",
- nextDisabled && "cursor-default text-muted-foreground"
- )}
- />
- </PaginationItem>
- </PaginationContent>
- </Pagination>
- );
-}
diff --git a/src/components/dashboard/RecentJobsCard.tsx b/src/components/dashboard/RecentJobsCard.tsx
deleted file mode 100644
index 1e3576f..0000000
--- a/src/components/dashboard/RecentJobsCard.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
-import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
-import { JobResponse } from "@/models/job.model";
-import { format } from "date-fns";
-import Link from "next/link";
-
-export default function RecentJobsCard({ jobs }: { jobs: JobResponse[] }) {
- return (
- <Card className="mb-2">
- <CardHeader>
- <CardTitle className="text-green-600">Recent Jobs</CardTitle>
- </CardHeader>
- <CardContent className="grid gap-6">
- {jobs.map((job) => (
- <div key={job.id} className="flex items-center gap-4">
- <Avatar className="hidden h-8 w-8 sm:flex">
- <AvatarImage
- src={job.Company?.logoUrl || "/images/jobsync-logo.svg"}
- alt="Avatar"
- />
- <AvatarFallback>JS</AvatarFallback>
- </Avatar>
- <Link href={`/dashboard/myjobs/${job?.id}`}>
- <div className="grid gap-1">
- <p className="text-sm font-medium leading-none">
- {job.JobTitle?.label}
- </p>
- <p className="text-sm text-muted-foreground">
- {job.Company?.label}
- </p>
- </div>
- </Link>
- <div className="ml-auto text-sm font-medium">
- {format(job?.appliedDate, "PP")}
- </div>
- </div>
- ))}
- </CardContent>
- </Card>
- );
-}
diff --git a/src/components/dashboard/WeeklyBarChart.tsx b/src/components/dashboard/WeeklyBarChart.tsx
deleted file mode 100644
index b35a83f..0000000
--- a/src/components/dashboard/WeeklyBarChart.tsx
+++ /dev/null
@@ -1,109 +0,0 @@
-"use client";
-import { barChartData } from "@/lib/data/barChartData";
-import { ResponsiveBar } from "@nivo/bar";
-import { Card, CardContent } from "../ui/card";
-
-type WeeklyBarChartProps = {
- data: any[];
- keys: string[];
- groupMode?: "grouped" | "stacked";
- axisLeftLegend: string;
-};
-
-export default function WeeklyBarChart({
- data,
- keys,
- groupMode,
- axisLeftLegend,
-}: WeeklyBarChartProps) {
- const roundedData = data.map((item) => {
- const newItem: any = { ...item };
- keys.forEach((key) => {
- if (typeof newItem[key] === "number") {
- newItem[key] = Math.round(newItem[key] * 100) / 100;
- }
- });
- return newItem;
- });
- return (
- <Card className="mb-2 lg:mb-0">
- <CardContent className="h-[240px] p-3">
- <ResponsiveBar
- data={roundedData}
- keys={keys}
- indexBy="day"
- margin={{
- top: 20,
- right: 10,
- bottom: 40,
- left: 45,
- }}
- padding={0.6}
- groupMode={groupMode}
- colors={groupMode === "stacked" ? { scheme: "nivo" } : "#2a7ef0"}
- enableTotals={groupMode === "stacked" ? true : false}
- valueFormat={(value) => value.toFixed(2)}
- theme={{
- text: {
- fill: "#9ca3af",
- },
- tooltip: {
- container: {
- background: "#1e293b",
- color: "#fff",
- },
- },
- }}
- axisTop={null}
- axisRight={null}
- enableGridX={false}
- enableGridY={false}
- enableLabel={true}
- labelTextColor={{
- from: "color",
- modifiers: [["darker", 1.6]],
- }}
- axisBottom={{
- tickSize: 5,
- tickPadding: 5,
- tickRotation: 0,
- legend: "DAYS OF WEEK",
- legendPosition: "middle",
- legendOffset: 32,
- truncateTickAt: 0,
- }}
- axisLeft={{
- tickSize: 5,
- tickPadding: 5,
- tickRotation: 0,
- legend: axisLeftLegend,
- legendPosition: "middle",
- legendOffset: -40,
- truncateTickAt: 0,
- }}
- motionConfig="gentle"
- // tooltip={({ id, value, color, indexValue }) => (
- // <div
- // style={{
- // padding: 8,
- // background: "#1e293b",
- // color: "#fff",
- // borderRadius: 4,
- // fontSize: 14,
- // minWidth: 120,
- // }}
- // >
- // <div>
- // <span style={{ color }}>{id}:</span>{" "}
- // <strong>
- // {value}
- // {axisLeftLegend.includes("Hours") && "h"}
- // </strong>
- // </div>
- // </div>
- // )}
- />
- </CardContent>
- </Card>
- );
-}