feat: Implement chat page state management in layout and sidebar
- Added `isChatPage` state to the Style context to manage chat page layout. - Updated `PageLayout` component to adjust padding based on the chat page state. - Enhanced `SiderBar` component to dispatch chat page state changes when chat-related items are selected.
This commit is contained in:
@@ -279,6 +279,11 @@ const SiderBar = () => {
|
||||
}}
|
||||
items={headerButtons}
|
||||
onSelect={(key) => {
|
||||
if (key.itemKey.toString().startsWith('chat')) {
|
||||
styleDispatch({ type: 'SET_CHAT_PAGE', payload: true });
|
||||
} else {
|
||||
styleDispatch({ type: 'SET_CHAT_PAGE', payload: false });
|
||||
}
|
||||
setSelectedKeys([key.itemKey]);
|
||||
}}
|
||||
footer={
|
||||
|
||||
Reference in New Issue
Block a user