Update DashboardNavigation to include notificationCenterVisible state, enhancing conditional rendering for navigation layout.
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
This commit is contained in:
parent
6d839ebe9c
commit
1b8f0b1445
@ -52,7 +52,7 @@ const DashboardNavigation = () => {
|
|||||||
const { userProfile } = useContext(AuthContext)
|
const { userProfile } = useContext(AuthContext)
|
||||||
const { showSpotlight } = useContext(SpotlightContext)
|
const { showSpotlight } = useContext(SpotlightContext)
|
||||||
const { connecting, connected } = useContext(ApiServerContext)
|
const { connecting, connected } = useContext(ApiServerContext)
|
||||||
const { toggleNotificationCenter, unreadCount } =
|
const { toggleNotificationCenter, unreadCount, notificationCenterVisible } =
|
||||||
useContext(NotificationContext)
|
useContext(NotificationContext)
|
||||||
const [apiServerState, setApiServerState] = useState('disconnected')
|
const [apiServerState, setApiServerState] = useState('disconnected')
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
@ -335,7 +335,7 @@ const DashboardNavigation = () => {
|
|||||||
<>
|
<>
|
||||||
{isElectron ? (
|
{isElectron ? (
|
||||||
<Flex
|
<Flex
|
||||||
className='ant-menu-horizontal ant-menu-light electron-navigation-wrapper'
|
className={`ant-menu-horizontal ant-menu-light${!notificationCenterVisible ? ' electron-navigation-wrapper' : ''}`}
|
||||||
style={{ lineHeight: '40px', padding: '0 2px 0 2px' }}
|
style={{ lineHeight: '40px', padding: '0 2px 0 2px' }}
|
||||||
>
|
>
|
||||||
{navigationContents}
|
{navigationContents}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user