Skip to content

Commit

Permalink
Hide browse all links on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Feb 7, 2023
1 parent 751eb1a commit 92a6d70
Showing 1 changed file with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ export default function SidebarNavigationScreenTemplates( {
} ) );
}

const browseAllLink = useLink( {
postType,
postId: undefined,
path: config[ postType ].path + '/all',
} );

return (
<SidebarNavigationScreen
path={ config[ postType ].path }
Expand All @@ -114,15 +120,13 @@ export default function SidebarNavigationScreenTemplates( {
<Item item={ item } key={ index } />
) ) }

<SidebarNavigationItem
className="edit-site-sidebar-navigation-screen-templates__see-all"
{ ...useLink( {
postType,
postId: undefined,
path: config[ postType ].path + '/all',
} ) }
children={ config[ postType ].labels.manage }
/>
{ ! isMobileViewport && (
<SidebarNavigationItem
className="edit-site-sidebar-navigation-screen-templates__see-all"
{ ...browseAllLink }
children={ config[ postType ].labels.manage }
/>
) }
</ItemGroup>
</>
}
Expand Down

0 comments on commit 92a6d70

Please sign in to comment.