Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tihuan committed Jan 17, 2024
1 parent b7647d0 commit d059e32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default function CollectionRevisionStatusCallout({
{!!revising_in && (
<span>
This public collection has a pending revision.{" "}
{/* (thuang): use `legacyBehavior` prop, since `<TextLink />` is `<a />` */}
<Link href={`/collections/${revising_in}`} legacyBehavior passHref>
<TextLink href="passHref">Continue Revision</TextLink>
</Link>
Expand All @@ -26,6 +27,7 @@ export default function CollectionRevisionStatusCallout({
{!!revision_of && (
<span>
This is a private revision of a published collection.{" "}
{/* (thuang): use `legacyBehavior` prop, since `<TextLink />` is `<a />` */}
<Link href={`/collections/${revision_of}`} legacyBehavior passHref>
<TextLink href="passHref">Open Published Collection</TextLink>
</Link>
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/components/Header/components/Nav/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default function Nav({ className, pathname }: Props): JSX.Element {
<NavSectionTitle>Application</NavSectionTitle>
<NavItemContainer>
<LinkWrapper>
{/* (thuang): use `legacyBehavior` prop, since `<AnchorButton />` is `<a />` */}
<Link href={ROUTES.COLLECTIONS} passHref legacyBehavior>
<AnchorButton
active={isRouteActive(pathname, ROUTES.COLLECTIONS)}
Expand All @@ -39,6 +40,7 @@ export default function Nav({ className, pathname }: Props): JSX.Element {
</Link>
</LinkWrapper>
<LinkWrapper>
{/* (thuang): use `legacyBehavior` prop, since `<AnchorButton />` is `<a />` */}
<Link href={ROUTES.DATASETS} passHref legacyBehavior>
<AnchorButton
active={isRouteActive(pathname, ROUTES.DATASETS)}
Expand All @@ -52,6 +54,7 @@ export default function Nav({ className, pathname }: Props): JSX.Element {
</Link>
</LinkWrapper>
<LinkWrapper>
{/* (thuang): use `legacyBehavior` prop, since `<AnchorButton />` is `<a />` */}
<Link href={ROUTES.WHERE_IS_MY_GENE} passHref legacyBehavior>
<AnchorButton
active={isRouteActive(pathname, ROUTES.WHERE_IS_MY_GENE)}
Expand All @@ -65,6 +68,7 @@ export default function Nav({ className, pathname }: Props): JSX.Element {
</Link>
</LinkWrapper>
<LinkWrapper>
{/* (thuang): use `legacyBehavior` prop, since `<AnchorButton />` is `<a />` */}
<Link href={ROUTES.CELL_GUIDE} passHref legacyBehavior>
<AnchorButton
active={isRouteActive(pathname, ROUTES.CELL_GUIDE)}
Expand Down Expand Up @@ -97,6 +101,7 @@ export default function Nav({ className, pathname }: Props): JSX.Element {
/>
</LinkWrapper>
<LinkWrapper>
{/* (thuang): use `legacyBehavior` prop, since `<AnchorButton />` is `<a />` */}
<Link href={ROUTES.CENSUS_DIRECTORY} passHref legacyBehavior>
<AnchorButton
active={isRouteActive(pathname, ROUTES.CENSUS_DIRECTORY)}
Expand Down

0 comments on commit d059e32

Please sign in to comment.