Skip to content

Commit

Permalink
fix: Use NextLink inside Tab component instead of wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan committed Dec 19, 2024
1 parent b786db8 commit 70a9c29
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 22 deletions.
5 changes: 0 additions & 5 deletions .yarnrc

This file was deleted.

34 changes: 17 additions & 17 deletions src/components/common/NavTabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ const NavTabs = ({ tabs }: { tabs: NavItem[] }) => {
return (
<Tabs value={activeTab} variant="scrollable" allowScrollButtonsMobile className={css.tabs}>
{tabs.map((tab, idx) => (
<NextLink key={tab.href} href={{ pathname: tab.href, query }} passHref legacyBehavior>
<Tab
component="a"
tabIndex={0}
className={css.tab}
label={
<Typography
variant="body2"
fontWeight={700}
color={activeTab === idx ? 'primary' : 'primary.light'}
className={css.label}
>
{tab.label}
</Typography>
}
/>
</NextLink>
<Tab
key={tab.href}
href={{ pathname: tab.href, query }}
component={NextLink}
tabIndex={0}
className={css.tab}
label={
<Typography
variant="body2"
fontWeight={700}
color={activeTab === idx ? 'primary' : 'primary.light'}
className={css.label}
>
{tab.label}
</Typography>
}
/>
))}
</Tabs>
)
Expand Down

0 comments on commit 70a9c29

Please sign in to comment.