diff --git a/src/components/SubmissionTable.tsx b/src/components/SubmissionTable.tsx index 4afe93aae..6fa357377 100644 --- a/src/components/SubmissionTable.tsx +++ b/src/components/SubmissionTable.tsx @@ -5,6 +5,7 @@ import { TableHeader, TableRow, TableCell, + Chip, } from "@nextui-org/react"; import React from "react"; import { useNavigate } from "react-router-dom"; @@ -28,28 +29,6 @@ export interface SubmissionTableProps { const SubmissionTable: React.FC = (props) => { const navigate = useNavigate(); - const renderCell = React.useCallback( - ( - submissionInfo: SubmissionServiceModel.SubmissionInfo, - columnUid: React.Key, - ) => { - if (columnUid === "problem") { - return submissionInfo.problem.title; - } - if (columnUid === "user") { - return submissionInfo.user.name; - } - if (columnUid === "language") { - return submissionInfo.language; - } - if (columnUid === "status") { - return submissionInfo.status; - } - return null; - }, - [], - ); - return ( = (props) => { } }} > - {(columnKey) => ( - {renderCell(item, columnKey)} - )} + {item.problem.title} + {item.user.name} + {item.language} + + + {item.status} + + )} diff --git a/src/layouts/adminLayout/Sidebar.tsx b/src/layouts/adminLayout/Sidebar.tsx index 24856cb56..05cbecd5b 100644 --- a/src/layouts/adminLayout/Sidebar.tsx +++ b/src/layouts/adminLayout/Sidebar.tsx @@ -8,8 +8,8 @@ import { useNavigate } from "react-router-dom"; const iconPath = `${import.meta.env.BASE_URL}images/oj-lab-icon.svg`; const navigation = [ - { name: "Problem", href: "/admin/problem", icon: HomeIcon, current: true }, - { name: "User", href: "/admin/user", icon: UsersIcon, current: false }, + { name: "Problem", href: "/admin/problem", icon: HomeIcon }, + { name: "User", href: "/admin/user", icon: UsersIcon }, ]; interface SidebarProps { @@ -96,10 +96,10 @@ export default function Sidebar(props: SidebarProps) {
  • { navigate(item.href); @@ -107,7 +107,7 @@ export default function Sidebar(props: SidebarProps) { >
    { navigate(item.href); @@ -156,7 +156,7 @@ export default function Sidebar(props: SidebarProps) { >