- {
- ProgrammingLanguageOptions.find(
- (language) =>
- language.value === row.original.language
- )?.badge
- }
-
- ),
- },
- {
- accessorKey: "is_passed",
- header: () =>
- {row.original.is_passed ? (
-
- ) : (
-
- )}
+ ),
+ },
+ {
+ accessorKey: "language",
+ header: () =>
Language
,
+ cell: ({ row }) => (
+
+ {
+ ProgrammingLanguageOptions.find(
+ (language) =>
+ language.value === row.original.language
+ )?.badge
+ }
+
+ ),
+ },
+ {
+ accessorKey: "is_passed",
+ header: () =>
Is Passed
,
+ cell: ({ row }) => {
+ return (
+
+ {row.original.is_passed ? (
+
+ ) : (
+
+ )}
+
+ );
+ },
+ },
+ {
+ accessorKey: "runtime_result",
+ header: "Runtime Result",
+ cell: ({ row }) => (
+
+
+
+ ),
+ },
+ {
+ accessorKey: "date",
+ header: "Submitted Date",
+ cell: ({ row }) => (
+
+ {readableDateFormat(row.original.date)}
+
+ ),
+ },
+ {
+ accessorKey: "action",
+ header: "",
+ cell: ({ row }) => (
+
- );
+ ),
},
- },
- {
- accessorKey: "runtime_result",
- header: "Runtime Result",
- cell: ({ row }) => (
-
-
-
- ),
- },
- {
- accessorKey: "date",
- header: "Submitted Date",
- cell: ({ row }) => (
-
{readableDateFormat(row.original.date)}
- ),
- },
- {
- accessorKey: "action",
- header: "",
- cell: ({ row }) => (
-
- ),
- },
- ];
+ ];
return (
diff --git a/src/components/Tables/ProblemTables/MyProblemsTable.tsx b/src/components/Tables/ProblemTables/MyProblemsTable.tsx
index c460852..384f580 100644
--- a/src/components/Tables/ProblemTables/MyProblemsTable.tsx
+++ b/src/components/Tables/ProblemTables/MyProblemsTable.tsx
@@ -16,7 +16,11 @@ import { readableDateFormat } from "../../../utilities/ReadableDateFormat";
import MyProblemDropdown from "../../Dropdowns/MyProblemDropdown";
import { DataTable } from "../Prototype/DataTable";
import DataTableSortableLayout from "../Prototype/DataTableSortableLayout";
-import { HoverCard, HoverCardContent, HoverCardTrigger } from "../../shadcn/HoverCard";
+import {
+ HoverCard,
+ HoverCardContent,
+ HoverCardTrigger,
+} from "../../shadcn/HoverCard";
import { Badge } from "../../shadcn/Badge";
const columns: ColumnDef
[] = [
@@ -35,7 +39,10 @@ const columns: ColumnDef[] = [
return (
-
+
{row.original.title}
@@ -120,7 +127,10 @@ const columns: ColumnDef[] = [
cell: ({ row }) => (
- {row.original.time_limit}
+
+ {row.original.time_limit.toFixed(3)}{" "}
+ ms
+
),
},
diff --git a/src/components/Tables/ProblemTables/PublicProblemsTable.tsx b/src/components/Tables/ProblemTables/PublicProblemsTable.tsx
index c05eb35..6fbe821 100644
--- a/src/components/Tables/ProblemTables/PublicProblemsTable.tsx
+++ b/src/components/Tables/ProblemTables/PublicProblemsTable.tsx
@@ -7,9 +7,9 @@ import TestcasesGradingIndicator from "../../TestcasesGradingIndicator";
import { Badge } from "../../shadcn/Badge";
import { Button } from "../../shadcn/Button";
import {
- HoverCard,
- HoverCardContent,
- HoverCardTrigger,
+ HoverCard,
+ HoverCardContent,
+ HoverCardTrigger,
} from "../../shadcn/HoverCard";
import { DataTable } from "../Prototype/DataTable";
@@ -34,7 +34,10 @@ const PublicProblemsTable = ({
className="mr-2 text-blue-400"
size={20}
/>
-
+
{row.original.title}
@@ -132,7 +135,7 @@ const PublicProblemsTable = ({
),
},
- {
+ {
accessorKey: "author",
header: "Author",
cell: ({ row }) => (
@@ -166,6 +169,7 @@ const PublicProblemsTable = ({
cell: ({ row }) => (
{
columns: ColumnDef[];
@@ -100,7 +99,7 @@ export function DataTable({
-
+ {/* */}
{/*