Skip to content

Commit

Permalink
include working dashboard links
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Amponsah committed Feb 8, 2025
1 parent e3ff961 commit 1e5eab2
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions frontend/src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Trophy, ThumbsUp, PlusIcon, Dot } from "lucide-react";
import Image from "next/image";
import { cn } from "@/lib/utils";
import { StatusPill } from "@/components/dashboard/StatusPill";
import Link from "next/link";

const page = () => {
const info = [
Expand All @@ -28,6 +29,7 @@ const page = () => {
];

type Field = {
id: number;
election: string;
voters: string;
candidates: string;
Expand All @@ -36,27 +38,31 @@ const page = () => {
};
const data: Field[] = [
{
id: 1,
election: "SRC President 2024",
voters: "25",
candidates: "3",
status: "Ongoing",
winner: "Undetermined",
},
{
id: 1,
election: "SRC President 2024",
voters: "25",
candidates: "3",
status: "Ongoing",
winner: "Undetermined",
},
{
id: 1,
election: "SRC President 2024",
voters: "25",
candidates: "3",
status: "Ongoing",
winner: "Undetermined",
},
{
id: 1,
election: "SRC President 2024",
voters: "25",
candidates: "3",
Expand Down Expand Up @@ -97,9 +103,12 @@ const page = () => {
/>

<div className="flex justify-end">
<button className="bg-secondary dark:bg-primary rounded-full px-6 text-white py-2.5">
<Link
href={"/dashboard/vote"}
className="bg-secondary dark:bg-primary rounded-full px-6 text-white py-2.5"
>
Cast vote
</button>
</Link>
</div>
</article>
</section>
Expand All @@ -108,10 +117,13 @@ const page = () => {
<header className="flex justify-between px-5">
<p className="uppercase">Elections</p>

<div className="flex items-center gap-3">
<Link
href={"dashboard/create-election"}
className="flex items-center gap-3"
>
<p className="text-secondary">Create election</p>
<PlusIcon className="size-6" />
</div>
</Link>
</header>

<div className="table-container w-full overflow-x-auto">
Expand Down Expand Up @@ -139,9 +151,12 @@ const page = () => {
</td>
<td className="py-3.5 ">{item.winner}</td>
<td className="py-3.5 ">
<button className="text-secondary pr-6">
<Link
href={"/dashboard/results/" + item.id}
className="text-secondary pr-6"
>
View results
</button>
</Link>
</td>
</tr>
))}
Expand Down

0 comments on commit 1e5eab2

Please sign in to comment.