Skip to content

Commit

Permalink
fix: anchor enclose tab to handle click
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Dec 24, 2020
1 parent ede1422 commit c37dff9
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions ui/app/src/SidebarsPage/SidebarsStoryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,26 +77,25 @@ export const SidebarsStoryPage: FC<DocPageProps> = ({ type, doc }) => {
const route =
tab.route || (tab.title ? tab.title.toLowerCase() : '');
return (
<Tab key={`tab_${route}`}>
<Link
href={
story && story.id
? getStoryPath(
story.id,
tabIndex > 0 ? route : undefined,
)
: docId
? getDocumentPath(
type,
docId,
tabIndex > 0 ? route : undefined,
)
: '#'
}
>
{tab.title}
</Link>
</Tab>
<Link
key={`tab_${route}`}
href={
story && story.id
? getStoryPath(
story.id,
tabIndex > 0 ? route : undefined,
)
: docId
? getDocumentPath(
type,
docId,
tabIndex > 0 ? route : undefined,
)
: '#'
}
>
<Tab>{tab.title}</Tab>
</Link>
);
})}
</TabList>
Expand Down

0 comments on commit c37dff9

Please sign in to comment.