From 2c475901bb56bd0f89f90fc9880739a55d74886e Mon Sep 17 00:00:00 2001 From: Petter Rasmussen Date: Wed, 5 Jun 2024 10:50:12 +0200 Subject: [PATCH] Remove rerun button --- .../Pages/MissionHistoryPage/HistoricMissionCard.tsx | 6 ++++-- .../Pages/MissionPage/MissionHeader/MissionHeader.tsx | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/Pages/MissionHistoryPage/HistoricMissionCard.tsx b/frontend/src/components/Pages/MissionHistoryPage/HistoricMissionCard.tsx index aa175e41f..cbc17c1c4 100644 --- a/frontend/src/components/Pages/MissionHistoryPage/HistoricMissionCard.tsx +++ b/frontend/src/components/Pages/MissionHistoryPage/HistoricMissionCard.tsx @@ -6,7 +6,7 @@ import { MissionStatusDisplayShort, } from 'components/Displays/MissionDisplays/MissionStatusDisplay' import { MissionRestartButton } from 'components/Displays/MissionButtons/MissionRestartButton' -import { TaskStatus } from 'models/Task' +import { TaskStatus, TaskType } from 'models/Task' import { useNavigate } from 'react-router-dom' import { formatDateTime } from 'utils/StringFormatting' @@ -71,7 +71,9 @@ export const HistoricMissionCard = ({ index, mission }: IndexedMissionProps) => - + {mission.tasks[0]?.type !== TaskType.ReturnHome && mission.tasks[0]?.type !== TaskType.Localization && ( + + )} ) diff --git a/frontend/src/components/Pages/MissionPage/MissionHeader/MissionHeader.tsx b/frontend/src/components/Pages/MissionPage/MissionHeader/MissionHeader.tsx index 7b8db79ba..58750002c 100644 --- a/frontend/src/components/Pages/MissionPage/MissionHeader/MissionHeader.tsx +++ b/frontend/src/components/Pages/MissionPage/MissionHeader/MissionHeader.tsx @@ -174,9 +174,11 @@ export const MissionHeader = ({ mission }: { mission: Mission }) => { missionStatus={mission.status} /> )} - {mission.endTime && ( - - )} + {mission.endTime && + mission.tasks[0]?.type !== TaskType.ReturnHome && + mission.tasks[0]?.type !== TaskType.Localization && ( + + )}