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 247b739
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 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
4 changes: 2 additions & 2 deletions frontend/src/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ img {
padding-left: 0;
padding-right: 0;
padding-top: 0;
/* (thuang): height: auto; is needed to ensure responsive aspect ratio is
correct.
/* (thuang): `height: auto;` is needed to ensure responsive aspect ratio is
correct when using `next/image`.
@see: https://nextjs.org/docs/pages/building-your-application/optimizing/images#responsive
*/
height: auto;
Expand Down

0 comments on commit 247b739

Please sign in to comment.