fix: several Navigation Bar and Drawer fixes (#2845)
* fix: several Navigation Bar and Drawer fixes Fixes #2821 - Fix navigation drawer animations - Fix navigation bar positioning - Do not display navigation drawer collapse button on mobile - Refactor code and rename componentst * Fix storybook test * fix: fix NavigationDrawerHeader elements space-between --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -3,7 +3,7 @@ import { useLocation, useNavigate } from 'react-router-dom';
|
||||
import { useObjectMetadataItemForSettings } from '@/object-metadata/hooks/useObjectMetadataItemForSettings';
|
||||
import { Icon123 } from '@/ui/input/constants/icons';
|
||||
import { useLazyLoadIcons } from '@/ui/input/hooks/useLazyLoadIcons';
|
||||
import NavItem from '@/ui/navigation/navigation-drawer/components/NavItem';
|
||||
import { NavigationDrawerItem } from '@/ui/navigation/navigation-drawer/components/NavigationDrawerItem';
|
||||
|
||||
export const ObjectMetadataNavItems = () => {
|
||||
const { activeObjectMetadataItems } = useObjectMetadataItemForSettings();
|
||||
@ -13,10 +13,9 @@ export const ObjectMetadataNavItems = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
{activeObjectMetadataItems.map((objectMetadataItem) => {
|
||||
if (objectMetadataItem.nameSingular === 'opportunity') return null;
|
||||
return (
|
||||
<NavItem
|
||||
{activeObjectMetadataItems.map((objectMetadataItem) =>
|
||||
objectMetadataItem.nameSingular === 'opportunity' ? null : (
|
||||
<NavigationDrawerItem
|
||||
key={objectMetadataItem.id}
|
||||
label={objectMetadataItem.labelPlural}
|
||||
to={`/objects/${objectMetadataItem.namePlural}`}
|
||||
@ -28,8 +27,8 @@ export const ObjectMetadataNavItems = () => {
|
||||
navigate(`/objects/${objectMetadataItem.namePlural}`);
|
||||
}}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
),
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user