mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-09 20:56:02 -05:00
Adjust layout
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user