Skip to content

Commit

Permalink
Remove rerun button
Browse files Browse the repository at this point in the history
  • Loading branch information
prasm313 committed Jun 5, 2024
1 parent a09d6d5 commit 2c47590
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -71,7 +71,9 @@ export const HistoricMissionCard = ({ index, mission }: IndexedMissionProps) =>
<MissionEndTimeDisplay mission={mission} />
</Table.Cell>
<Table.Cell id={InspectionTableColumns.Rerun}>
<MissionRestartButton mission={mission} hasFailedTasks={missionHasFailedTasks} />
{mission.tasks[0]?.type !== TaskType.ReturnHome && mission.tasks[0]?.type !== TaskType.Localization && (
<MissionRestartButton mission={mission} hasFailedTasks={missionHasFailedTasks} />
)}
</Table.Cell>
</Table.Row>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,11 @@ export const MissionHeader = ({ mission }: { mission: Mission }) => {
missionStatus={mission.status}
/>
)}
{mission.endTime && (
<MissionRestartButton mission={mission} hasFailedTasks={missionHasFailedTasks} />
)}
{mission.endTime &&
mission.tasks[0]?.type !== TaskType.ReturnHome &&
mission.tasks[0]?.type !== TaskType.Localization && (
<MissionRestartButton mission={mission} hasFailedTasks={missionHasFailedTasks} />
)}
</TitleSection>
<Typography
variant="body_long"
Expand Down

0 comments on commit 2c47590

Please sign in to comment.