Skip to content

Commit

Permalink
Fix nested errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddasol committed Jan 28, 2025
1 parent 769f404 commit a9a11f5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions frontend/src/components/Pages/RobotPage/RobotPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { VideoStreamWindow } from '../MissionPage/VideoStream/VideoStreamWindow'
import { MoveRobotArmSection } from './RobotArmMovement'
import { Icons } from 'utils/icons'
import { tokens } from '@equinor/eds-tokens'
import { StopMissionDialog } from '../FrontPage/MissionOverview/StopDialogs'
import { SkipMissionDialog } from '../FrontPage/MissionOverview/StopDialogs'
import { TaskType } from 'models/Task'
import { useMissionsContext } from 'components/Contexts/MissionRunsContext'
import { ReturnHomeButton } from './ReturnHomeButton'
Expand Down Expand Up @@ -67,7 +67,7 @@ export const RobotPage = () => {
const selectedRobot = enabledRobots.find((robot) => robot.id === robotId)

const [isDialogOpen, setIsDialogOpen] = useState(false)
const toggleStopMissionDialog = () => {
const toggleSkipMissionDialog = () => {
setIsDialogOpen(!isDialogOpen)
}

Expand Down Expand Up @@ -137,7 +137,7 @@ export const RobotPage = () => {
<StyledTextButton
variant="contained"
onClick={() => {
toggleStopMissionDialog()
toggleSkipMissionDialog()
}}
>
<Icon
Expand All @@ -146,14 +146,14 @@ export const RobotPage = () => {
size={24}
/>
{TranslateText('Stop')} {selectedRobot.name}
<StopMissionDialog
missionName={mission?.name}
robotId={selectedRobot.id}
missionTaskType={missionTaskType}
isStopMissionDialogOpen={isDialogOpen}
toggleDialog={toggleStopMissionDialog}
/>
</StyledTextButton>
<SkipMissionDialog
missionName={mission?.name}
robotId={selectedRobot.id}
missionTaskType={missionTaskType}
isSkipMissionDialogOpen={isDialogOpen}
toggleDialog={toggleSkipMissionDialog}
/>
{selectedRobot && <ReturnHomeButton robot={selectedRobot} />}

{selectedRobot.model.type === RobotType.TaurobInspector && (
Expand Down

0 comments on commit a9a11f5

Please sign in to comment.