From d2f8d0ff12d778dd6ad6614d5b71cb51d76d50b8 Mon Sep 17 00:00:00 2001 From: Noah Spannbauer Date: Sun, 22 Mar 2026 09:12:26 -0500 Subject: [PATCH] fixing pilot page responsiveness --- client/src/components/pilots/Pilots.tsx | 72 +++++++++++++++++++------ 1 file changed, 56 insertions(+), 16 deletions(-) diff --git a/client/src/components/pilots/Pilots.tsx b/client/src/components/pilots/Pilots.tsx index e876f44..8655fb3 100644 --- a/client/src/components/pilots/Pilots.tsx +++ b/client/src/components/pilots/Pilots.tsx @@ -17,11 +17,31 @@ import { Pilot } from './Pilot.interface'; import Alert from '../alert/Alert'; import { useOidc } from '../../auth/oidcConfig'; +interface ActionsProps { + id: string; +} + const Pilots: React.FC = () => { const [state, dispatch] = useReducer(reducer, initialState); const { userRole } = useUserRole(); const { screenSize } = useBreakpoints(); const { isUserLoggedIn } = useOidc(); + const Actions = ({ id }: ActionsProps) => { + return ( +
+
+ +
+ ) + } const getPilots = async () => { try { @@ -134,18 +154,7 @@ const Pilots: React.FC = () => { }, cell: (info: CellContext) => { return ( -
-
- -
+ ) } } @@ -172,7 +181,7 @@ const Pilots: React.FC = () => { return ( <> -
+

Pilots

@@ -259,9 +268,40 @@ const Pilots: React.FC = () => {
} - {/* {state.pilots.length > 0 && screenSize === ScreenSize.SM && - - } */} + {state.pilots.length > 0 && screenSize === ScreenSize.SM && +
+ <> + {table.getRowModel().rows.map((row) => { + return ( +
+
+
+ <> + {row.getVisibleCells().map((cell) => { + return ( + <> + {cell.column.columnDef.header !== 'Actions' && + <> +
+ {flexRender(cell.column.columnDef.cell, cell.getContext())} +
+
+ +
+ + } + + ) + })} + +
+
+
+ ) + })} + +
+ }
{state.isFormOpen && (