Skip to content

Commit

Permalink
feat(header): consider pagination on Relevantes and use `startsWith…
Browse files Browse the repository at this point in the history
…` method on other paths
  • Loading branch information
filipedeschamps committed Aug 24, 2022
1 parent b9743b1 commit f24e8a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pages/interface/components/Header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ export default function HeaderComponent() {
return (
<Header>
<Header.Item>
<Header.Link href="/" fontSize={2} sx={pathname === '/' && activeLinkStyle}>
<Header.Link href="/" fontSize={2} sx={(pathname === '/' || pathname.startsWith('/pagina')) && activeLinkStyle}>
<CgTab size={32} />
<Box sx={{ ml: 2 }}>Relevantes</Box>
</Header.Link>
</Header.Item>

<Header.Item>
<Header.Link href="/recentes" fontSize={2} sx={pathname.includes('recentes') && activeLinkStyle}>
<Header.Link href="/recentes" fontSize={2} sx={pathname.startsWith('/recentes') && activeLinkStyle}>
Recentes
</Header.Link>
</Header.Item>
Expand All @@ -32,7 +32,7 @@ export default function HeaderComponent() {
<Header.Link
href="/status"
fontSize={2}
sx={{ display: ['none', 'block'], ...(pathname.includes('status') && activeLinkStyle) }}>
sx={{ display: ['none', 'block'], ...(pathname.startsWith('/status') && activeLinkStyle) }}>
Status
</Header.Link>
</Header.Item>
Expand Down

0 comments on commit f24e8a7

Please sign in to comment.