Skip to content

Commit

Permalink
refactor: simplify layout component
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Setch <[email protected]>
  • Loading branch information
setchy committed Dec 25, 2024
1 parent 981678d commit 166f1b3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import { siteMetadata } from "../constants";
export interface Props {
title: string;
hideFooter?: boolean;
}
const { title, hideFooter = false } = Astro.props;
const { title } = Astro.props;
const pageTitle = `${title} - ${siteMetadata.title}`;
const ogImage = `${siteMetadata.url}/images/social.png`;
---
Expand Down Expand Up @@ -60,6 +59,6 @@ const ogImage = `${siteMetadata.url}/images/social.png`;
<body class="flex flex-col min-h-screen">
<Navbar currentPathname={Astro.url.pathname} />
<slot />
{!hideFooter && <Footer currentPathname={Astro.url.pathname} />}
<Footer currentPathname={Astro.url.pathname} />
</body>
</html>

0 comments on commit 166f1b3

Please sign in to comment.