Skip to content

Commit

Permalink
fix: remove hard-coded height from layouts (#1257)
Browse files Browse the repository at this point in the history
  • Loading branch information
0916dhkim committed Jun 15, 2023
1 parent 2b38c25 commit 20061bc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
6 changes: 3 additions & 3 deletions layouts/filter.tsx
Expand Up @@ -12,9 +12,9 @@ const FilterLayout = ({ children }: { children: React.ReactNode }) => {
const { toolList, selectedTool, filterName, selectedFilter, userOrg } = useNav();

return (
<>
<div className="min-h-screen flex flex-col">
<TopNav />
<div className="page-container flex min-h-[calc(100vh-(54px+95px))] bg-light-slate-3 flex-col items-center">
<div className="page-container flex grow bg-light-slate-3 flex-col items-center">
<div className="info-container container w-full min-h-[100px]">
<Header>
<FilterHeader />
Expand All @@ -33,7 +33,7 @@ const FilterLayout = ({ children }: { children: React.ReactNode }) => {
</main>
</div>
<Footer />
</>
</div>
);
};

Expand Down
6 changes: 3 additions & 3 deletions layouts/hub-page.tsx
Expand Up @@ -25,9 +25,9 @@ const HubPageLayout = ({ children }: { children: React.ReactNode }) => {
let isOwner = !!(userId && insight && `${userId}` === `${insight.user.id}`);

return (
<>
<div className="flex flex-col min-h-screen">
<TopNav />
<div className="page-container flex min-h-[calc(100vh-(54px+95px))] bg-light-slate-3 flex-col items-center">
<div className="page-container flex grow bg-light-slate-3 flex-col items-center">
<div className="info-container container w-full min-h-[100px]">
<Header>
{insight ? (
Expand Down Expand Up @@ -65,7 +65,7 @@ const HubPageLayout = ({ children }: { children: React.ReactNode }) => {
</main>
</div>
<Footer />
</>
</div>
);
};

Expand Down
6 changes: 3 additions & 3 deletions layouts/hub.tsx
Expand Up @@ -5,15 +5,15 @@ import TopNav from "../components/organisms/TopNav/top-nav";

const HubLayout = ({ children }: { children: React.ReactNode }) => {
return (
<>
<div className="flex flex-col min-h-screen">
<TopNav />
<div className="page-container flex min-h-[calc(100vh-(54px+95px))] flex-col items-center">
<div className="page-container flex grow flex-col items-center">
<main className="flex w-full flex-1 flex-col items-center px-3 md:px-16 py-8 bg-light-slate-2">
<div className="container mx-auto px-2 md:px-16">{children}</div>
</main>
</div>
<Footer />
</>
</div>
);
};

Expand Down
6 changes: 2 additions & 4 deletions layouts/login.tsx
Expand Up @@ -3,11 +3,9 @@ import LoginTopNav from "../components/organisms/LoginTopNav/login-top-nav";

const LoginLayout = ({ children }: { children: React.ReactNode }) => {
return (
<div className="bg-[#ECECEC] px-3">
<div className="bg-[#ECECEC] px-3 flex flex-col min-h-screen">
<LoginTopNav />
<main className="flex w-full min-h-[calc(100vh-54px)] flex-1 pt-10 lg:pt-0 lg:items-center lg:justify-center">
{children}
</main>
<main className="flex grow w-full flex-1 pt-10 lg:pt-0 lg:items-center lg:justify-center">{children}</main>
</div>
);
};
Expand Down
6 changes: 3 additions & 3 deletions layouts/profile.tsx
Expand Up @@ -5,13 +5,13 @@ import TopNav from "../components/organisms/TopNav/top-nav";

const ProfileLayout = ({ children }: { children: React.ReactNode }) => {
return (
<>
<div className="flex flex-col min-h-screen">
<TopNav />
<div className="page-container flex min-h-[calc(100vh-(54px+95px))] flex-col items-center">
<div className="page-container flex grow flex-col items-center">
<main className="flex pb-16 w-full flex-1 flex-col items-center bg-light-slate-2">{children}</main>
</div>
<Footer />
</>
</div>
);
};

Expand Down

0 comments on commit 20061bc

Please sign in to comment.