Skip to content

Commit

Permalink
fix(app): fix navigation menu display position issue (#15734)
Browse files Browse the repository at this point in the history
* fix(app): fix navigation menu display position issue
  • Loading branch information
koji authored Jul 22, 2024
1 parent 3c74322 commit a6bf864
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/src/organisms/Navigation/NavigationMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react'
import { createPortal } from 'react-dom'
import { useDispatch } from 'react-redux'
import { useTranslation } from 'react-i18next'
import { useHistory } from 'react-router-dom'
Expand All @@ -8,15 +9,16 @@ import {
COLORS,
Flex,
Icon,
SPACING,
LegacyStyledText,
SPACING,
TYPOGRAPHY,
} from '@opentrons/components'

import { MenuList } from '../../atoms/MenuList'
import { MenuItem } from '../../atoms/MenuList/MenuItem'
import { home, ROBOT } from '../../redux/robot-controls'
import { useLights } from '../Devices/hooks'
import { getTopPortalEl } from '../../App/portal'
import { RestartRobotConfirmationModal } from './RestartRobotConfirmationModal'

import type { Dispatch } from '../../redux/types'
Expand Down Expand Up @@ -48,9 +50,7 @@ export function NavigationMenu(props: NavigationMenuProps): JSX.Element {
setShowNavMenu(false)
}

// ToDo (kk:10/02/2023)
// Need to update a function for onClick
return (
return createPortal(
<>
{showRestartRobotConfirmationModal ? (
<RestartRobotConfirmationModal
Expand Down Expand Up @@ -132,6 +132,7 @@ export function NavigationMenu(props: NavigationMenuProps): JSX.Element {
</Flex>
</MenuItem>
</MenuList>
</>
</>,
getTopPortalEl()
)
}

0 comments on commit a6bf864

Please sign in to comment.