Skip to content

Commit 89c29e9

Browse files
fix: stick footer to bottom of the page (#469)
* fix: stick footer to bottom of the page * fix: 100% width
1 parent a2532ce commit 89c29e9

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/layout/PageLayout/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { JSONCrackLogo } from "../JsonCrackLogo";
88

99
export const Footer = () => {
1010
return (
11-
<Container mt={60} px={60} pb="xl" bg="black" fluid>
11+
<Container w="100%" mt={60} px={60} pb="xl" bg="black" fluid>
1212
<Divider color="gray.3" mb="xl" mx={-60} />
1313
<Flex justify="space-between">
1414
<Stack gap={4} visibleFrom="sm">

src/layout/PageLayout/index.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,21 @@ const inter = Inter({
1212
const StyledLayoutWrapper = styled.div`
1313
background: #fff;
1414
font-family: ${inter.style.fontFamily};
15+
display: flex;
16+
flex-direction: column;
17+
min-height: 100vh;
18+
`;
19+
20+
const ContentWrapper = styled.div`
21+
flex: 1;
1522
`;
1623

1724
const PageLayout = ({ children }: React.PropsWithChildren) => {
1825
return (
1926
<ThemeProvider theme={lightTheme}>
2027
<StyledLayoutWrapper>
2128
<Navbar />
22-
{children}
29+
<ContentWrapper>{children}</ContentWrapper>
2330
<Footer />
2431
</StyledLayoutWrapper>
2532
</ThemeProvider>

0 commit comments

Comments
 (0)