Adjust layout

This commit is contained in:
Kalle
2023-02-15 17:07:26 +02:00
parent 81b26a3046
commit 44bd60afe8
2 changed files with 22 additions and 21 deletions

View File

@@ -19,26 +19,23 @@ export const Main = ({
const showLeaderboard = !user?.patronTier;
return (
<>
{showLeaderboard ? <div id="top-leaderboard" /> : null}
<main
className={
classNameOverwrite
? clsx(classNameOverwrite, {
"half-width": halfWidth,
"pt-12-forced": showLeaderboard,
})
: clsx(
"layout__main",
"main",
{ "half-width": halfWidth, "pt-12-forced": showLeaderboard },
className
)
}
style={style}
>
{children}
</main>
</>
<main
className={
classNameOverwrite
? clsx(classNameOverwrite, {
"half-width": halfWidth,
"pt-12-forced": showLeaderboard,
})
: clsx(
"layout__main",
"main",
{ "half-width": halfWidth, "pt-12-forced": showLeaderboard },
className
)
}
style={style}
>
{children}
</main>
);
};

View File

@@ -50,6 +50,9 @@ export const Layout = React.memo(function Layout({
const isFrontPage = location.pathname === "/";
const showLeaderboard =
!user?.patronTier && !location.pathname.includes("plans");
return (
<div className="layout__container">
<header className="layout__header">
@@ -107,6 +110,7 @@ export const Layout = React.memo(function Layout({
</div>
</header>
{!isFrontPage ? <SideNav /> : null}
{showLeaderboard ? <div id="top-leaderboard" /> : null}
{children}
<Footer patrons={patrons} />
</div>