import { useState } from 'react'; import PilotForm from '../pilotForm/PilotForm'; import { Button, EllipsisVerticalIcon, EyeIcon, IconButton, Menu, MenuHandler, MenuItem, MenuList, PenIcon, PlusIcon, Table, TableColumnDef, TrashIcon, Typography } from '@noahspan/noahspan-components'; const Pilots: React.FC = () => { const [isDrawerOpen, setIsDrawerOpen] = useState(false); const onOpenCloseDrawer = () => { setIsDrawerOpen(!isDrawerOpen); }; type Person = { firstName: string; lastName: string; age: number; visits: number; status: string; progress: number; }; const data: Person[] = [ { firstName: 'tanner', lastName: 'linsley', age: 24, visits: 100, status: 'In Relationship', progress: 50 }, { firstName: 'tandy', lastName: 'miller', age: 40, visits: 40, status: 'Single', progress: 80 }, { firstName: 'joe', lastName: 'dirte', age: 45, visits: 20, status: 'Complicated', progress: 10 } ]; const columns: TableColumnDef[] = [ { accessorKey: 'firstName', header: 'First Name', cell: ({ getValue }) => (
{getValue().charAt(0).toUpperCase() + getValue().slice(1)}
) }, { accessorKey: 'lastName', header: 'Last Name', cell: ({ getValue }) => (
{getValue().charAt(0).toUpperCase() + getValue().slice(1)}
) }, { accessorKey: 'age', header: 'Age', cellProps: { className: 'text-right' } }, { accessorKey: 'visits', header: 'Visits', cellProps: { className: 'text-right' } }, { accessorKey: 'status', header: 'Status' }, { accessorKey: 'progress', header: 'Progress', cellProps: { className: 'text-right' } }, { id: 'actions', header: 'Actions', cellProps: { className: 'text-center' }, cell: () => { return (
Edit View
Delete
); }, enableSorting: false } ]; return ( <>
Pilots
); }; export default Pilots;