[] = [
+ {
+ accessorKey: "submissionId",
+ accessorFn: (row) => row.msg.sid,
+ meta: {
+ // for displaying the columns dropdown
+ headerTitle: "Submission ID",
+ },
+ header: ({ column }) => {
+ return ;
+ },
+ cell: ({ row }) => {
+ return (
+
+ {row.getValue("submissionId")}
+
+ );
+ },
+ },
+ {
+ accessorKey: "problemNum",
+ accessorFn: (row) => row.msg.pnum,
+ meta: {
+ // for displaying the columns dropdown
+ headerTitle: "Problem Number",
+ },
+ header: ({ column }) => {
+ return ;
+ },
+ cell: ({ row }) => {
+ return (
+
+ {row.getValue("problemNum")}
+
+ );
+ },
+ },
+ {
+ accessorKey: "problemTitle",
+ accessorFn: (row) => row.msg.pTitle,
+ meta: {
+ // for displaying the columns dropdown
+ headerTitle: "Problem Title",
+ },
+ header: ({ column }) => {
+ return ;
+ },
+ cell: ({ row }) => {
+ return (
+
+ {row.getValue("problemTitle")}
+
+ );
+ },
+ },
+ {
+ accessorKey: "username",
+ accessorFn: (row) => `${row.msg.name} (${row.msg.uname})`,
+ meta: {
+ // for displaying the columns dropdown
+ headerTitle: "User (username)",
+ },
+ header: ({ column }) => {
+ return ;
+ },
+ cell: ({ row }) => {
+ return (
+
+ {row.getValue("username")}
+
+ );
+ },
+ },
+ {
+ accessorKey: "verdict",
+ accessorFn: (row) => row.msg.verdict.title,
+ meta: {
+ // for displaying the columns dropdown
+ headerTitle: "Verdict",
+ },
+ header: ({ column }) => {
+ return ;
+ },
+ cell: ({ row }) => {
+ return (
+
+ {row.getValue("verdict")}
+
+ );
+ },
+ },
+ {
+ accessorKey: "language",
+ accessorFn: (row) => row.msg.lan,
+ meta: {
+ // for displaying the columns dropdown
+ headerTitle: "Language",
+ },
+ header: ({ column }) => {
+ return ;
+ },
+ cell: ({ row }) => {
+ return {row.getValue("language")}
;
+ },
+ enableSorting: false,
+ },
+ {
+ accessorKey: "runtime",
+ accessorFn: (row) => row.msg.run,
+ meta: {
+ // for displaying the columns dropdown
+ headerTitle: "Runtime",
+ },
+ header: ({ column }) => {
+ return ;
+ },
+ cell: ({ row }) => {
+ return {((row.getValue("runtime") as number) / 1000).toFixed(3)}
;
+ },
+ enableSorting: false,
+ },
+ {
+ accessorKey: "rank",
+ accessorFn: (row) => row.msg.rank,
+ meta: {
+ // for displaying the columns dropdown
+ headerTitle: "Rank",
+ },
+ header: ({ column }) => {
+ return ;
+ },
+ cell: ({ row }) => {
+ return {row.getValue("rank")}
;
+ },
+ enableSorting: false,
+ },
+ {
+ accessorKey: "submitTime",
+ accessorFn: (row) => row.msg.sbt,
+ meta: {
+ // for displaying the columns dropdown
+ headerTitle: "Submit Time",
+ },
+ header: ({ column }) => {
+ return (
+
+ );
+ },
+ cell: ({ row }) => {
+ return (
+
+
+
+
+ {moment.unix(row.getValue("submitTime")).fromNow()}
+
+
+
+
+ Submitted at{" "}
+ {moment.unix(row.getValue("submitTime")).toLocaleString()}
+
+
+
+
+ );
+ },
+ enableSorting: false,
+ },
+];
diff --git a/src/app/globals.css b/src/app/globals.css
index 0b46ea1..319770a 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -73,4 +73,12 @@
body {
@apply bg-background text-foreground;
}
-}
\ No newline at end of file
+}
+
+.nav-link {
+ @apply rounded-lg p-2 hover:underline hover:dark:bg-zinc-800 hover:bg-zinc-200
+}
+
+.active-nav-link {
+ @apply rounded-lg p-2 underline dark:bg-zinc-800 bg-zinc-200 text-primary
+}
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index d498d66..91ac519 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -1,6 +1,8 @@
import type { Metadata } from "next";
import { Inter as FontSans } from "next/font/google";
import { ThemeProvider } from "@/components/theme-provider";
+import Navbar from "@/components/navbar";
+import ReactQueryProvider from "@/provider/ReactQuery";
import "./globals.css";
import { cn } from "@/lib/utils";
@@ -29,14 +31,17 @@ export default function RootLayout({
inter.variable,
)}
>
-
- {children}
-
+
+
+
+ {children}
+
+