fix: Refine sider visibility logic in HeaderBar component
Some checks failed
Publish Docker image (amd64) / Push Docker image to multiple registries (push) Has been cancelled
Some checks failed
Publish Docker image (amd64) / Push Docker image to multiple registries (push) Has been cancelled
- Updated the click handler in HeaderBar to correctly toggle the visibility of the sider based on the current item selection. - Ensured that the sider is hidden when navigating to the home item and displayed conditionally for other items, improving the user interface responsiveness.
This commit is contained in:
parent
ed1a6bc0f8
commit
342b673f89
@ -148,10 +148,12 @@ const HeaderBar = () => {
|
||||
<div onClick={(e) => {
|
||||
if (props.itemKey === 'home') {
|
||||
styleDispatch({ type: 'SET_INNER_PADDING', payload: false });
|
||||
// styleDispatch({ type: 'SET_SIDER', payload: false });
|
||||
styleDispatch({ type: 'SET_SIDER', payload: false });
|
||||
} else {
|
||||
styleDispatch({ type: 'SET_INNER_PADDING', payload: true });
|
||||
// styleDispatch({ type: 'SET_SIDER', payload: true });
|
||||
if (!styleState.isMobile) {
|
||||
styleDispatch({ type: 'SET_SIDER', payload: true });
|
||||
}
|
||||
}
|
||||
}}>
|
||||
<Link
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user