import { FC, ReactElement, useState } from 'react'; import { BackofficeWrapper, DataTable, } from '@imphnen-frontend-service/ui/organisms'; import { ColumnDef, getCoreRowModel, getPaginationRowModel, PaginationState, RowSelectionState, useReactTable, } from '@tanstack/react-table'; import { Button } from '@imphnen-frontend-service/ui/atoms'; import { cn } from '@imphnen-frontend-service/utils'; import { EditOutlined } from '@ant-design/icons'; export const HackathonUsersPage: FC = (): ReactElement => { const [rowSelection, setRowSelection] = useState({}); const [pagination, setPagination] = useState({ pageIndex: 0, pageSize: 9, }); const mockData: any[] = Array.from({ length: 90 }, (_, i) => ({ id: i + 1, project_name: `Project ${i + 1}`, repository_url: `https://github.com/user/repo${i + 1}`, demo_url: `https://demo.example.com/project${i + 1}`, presentation_url: `https://slides.example.com/project${i + 1}`, })); type UserStatus = 'active' | 'inactive'; interface SubmissionType { id: number; project_name: string; repository_url: string; demo_url: string; presentation_url: string; } const columns: ColumnDef[] = [ { header: 'Project Name', accessorKey: 'project_name', }, { header: 'Repository URL', accessorKey: 'repository_url', }, { header: 'Demo URL', accessorKey: 'demo_url', }, { header: 'Presentation URL', accessorKey: 'presentation_url', }, { header: 'Action', meta: { cellClassName: cn('w-72') }, cell: ({ row }) => ( ), }, ]; const table = useReactTable({ data: mockData, columns, state: { pagination, rowSelection, }, enableRowSelection: true, onRowSelectionChange: setRowSelection, getCoreRowModel: getCoreRowModel(), getPaginationRowModel: getPaginationRowModel(), onPaginationChange: setPagination, pageCount: Math.ceil(mockData.length / pagination.pageSize), manualPagination: false, }); return (

Project Submission

{/* Filters and actions */}
{/* Table */}
{/* Modals extracted into shared backoffice components */}
); }; export default HackathonUsersPage;