From 6e9076bb56bba016f87685fad109b836871295c5 Mon Sep 17 00:00:00 2001 From: Konrad Jamrozik Date: Sat, 22 Jun 2024 20:24:55 -0700 Subject: [PATCH] refactor DeployMissionDialog --- .../DeployMissionDialog.tsx | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/web/src/components/MissionSitesDataGrid/DeployMissionDialog.tsx b/web/src/components/MissionSitesDataGrid/DeployMissionDialog.tsx index e58128d4..4be15f88 100644 --- a/web/src/components/MissionSitesDataGrid/DeployMissionDialog.tsx +++ b/web/src/components/MissionSitesDataGrid/DeployMissionDialog.tsx @@ -18,6 +18,7 @@ import { factionsRenderMap } from '../../lib/rendering/renderFactions' import { getSx } from '../../lib/rendering/renderUtils' import { AgentsDataGrid } from '../AgentsDataGrid/AgentsDataGrid' import { Label } from '../Label' +import { Stack } from '@mui/material' export type DeployMissionDialogProps = { readonly missionSite: MissionSite | undefined @@ -74,24 +75,20 @@ export default function DeployMissionDialog( - - {missionDetailsFragment(props, assets)} - {agentsGridFragment( + + {missionDetailsGrid(props, assets)} + {agentsGridGrid( props, gameSession, assets, rowSelectionModel, setRowSelectionModel, )} - + @@ -101,12 +98,12 @@ export default function DeployMissionDialog( ) } -function missionDetailsFragment( +function missionDetailsGrid( props: DeployMissionDialogProps, assets: Assets | undefined, ): React.JSX.Element { return ( - + @@ -151,11 +148,11 @@ function missionDetailsFragment( - + ) } -function agentsGridFragment( +function agentsGridGrid( props: DeployMissionDialogProps, gameSession: GameSession, assets: Assets | undefined, @@ -205,7 +202,7 @@ function agentsGridFragment( } return ( - + - + ) }