Skip to content

Commit

Permalink
🐾 Hide footer block if there are no links (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 authored Aug 1, 2023
1 parent 6df3c3d commit 28a0445
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/forty-shirts-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@myst-theme/site': patch
---

Footer link blocks hidden if there aren't any!
2 changes: 1 addition & 1 deletion packages/site/src/components/FooterLinksBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const FooterLink = ({
};

export function FooterLinksBlock({ links }: { links?: FooterLinks }) {
if (!links) return null;
if (!links || (!links.navigation?.prev && !links.navigation?.next)) return null;
return (
<div className="flex pt-10 mb-10 space-x-4">
{links.navigation?.prev && <FooterLink {...links.navigation?.prev} right />}
Expand Down

0 comments on commit 28a0445

Please sign in to comment.