mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 12:02:10 +03:00
Hide the "Expand to Full Page" button on Email and Calendar pages (#8615)
### Overview This pull request addresses issue #8612 by ensuring the "Expand to Full Page" button does not appear on the Email and Calendar pages in the right drawer. ### Changes Made - Added conditions in the `RightDrawerTopBar` component to prevent the `RightDrawerTopBarExpandButton` from rendering on: - Email pages (`RightDrawerPages.ViewEmailThread`) - Calendar pages (`RightDrawerPages.ViewCalendarEvent`) - Verified that the button still renders correctly on other pages, such as Record pages. ### Testing Since I couldn't run the project locally, I was unable to confirm the changes in a running environment. However, the logic has been carefully updated to ensure the button is conditionally hidden based on the current `rightDrawerPage` state. ### Additional Notes Please let me know if further adjustments are needed or if there are any issues during testing. Thank you for reviewing this PR! --------- Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
parent
39076df922
commit
8772f8aac7
@ -85,13 +85,14 @@ export const RightDrawerTopBar = () => {
|
||||
|
||||
const ObjectIcon = getIcon(objectMetadataItem.icon);
|
||||
|
||||
const label =
|
||||
rightDrawerPage === RightDrawerPages.ViewRecord
|
||||
const isViewRecordRightDrawerPage =
|
||||
rightDrawerPage === RightDrawerPages.ViewRecord;
|
||||
|
||||
const label = isViewRecordRightDrawerPage
|
||||
? objectMetadataItem.labelSingular
|
||||
: RIGHT_DRAWER_PAGE_TITLES[rightDrawerPage];
|
||||
|
||||
const Icon =
|
||||
rightDrawerPage === RightDrawerPages.ViewRecord ? ObjectIcon : PageIcon;
|
||||
const Icon = isViewRecordRightDrawerPage ? ObjectIcon : PageIcon;
|
||||
|
||||
return (
|
||||
<StyledRightDrawerTopBar
|
||||
@ -122,7 +123,9 @@ export const RightDrawerTopBar = () => {
|
||||
<RightDrawerTopBarMinimizeButton />
|
||||
)}
|
||||
|
||||
{!isMobile && !isRightDrawerMinimized && (
|
||||
{!isMobile &&
|
||||
!isRightDrawerMinimized &&
|
||||
isViewRecordRightDrawerPage && (
|
||||
<RightDrawerTopBarExpandButton
|
||||
to={
|
||||
getBasePathToShowPage({
|
||||
@ -131,6 +134,7 @@ export const RightDrawerTopBar = () => {
|
||||
}
|
||||
/>
|
||||
)}
|
||||
|
||||
<RightDrawerTopBarCloseButton />
|
||||
</StyledTopBarWrapper>
|
||||
</StyledRightDrawerTopBar>
|
||||
|
Loading…
Reference in New Issue
Block a user