Skip to content

Commit a60abd2

Browse files
committed
feat: remove prop footer to layout
1 parent b866dc3 commit a60abd2

3 files changed

Lines changed: 5 additions & 17 deletions

File tree

components/composite/Checkout/index.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { AppContext } from "components/data/AppProvider"
2727
import { useActiveStep } from "components/hooks/useActiveStep"
2828
import { LayoutDefault } from "components/layouts/LayoutDefault"
2929
import { Accordion, AccordionItem } from "components/ui/Accordion"
30-
import { Button, ButtonWrapper } from "components/ui/Button"
3130
import { Footer } from "components/ui/Footer"
3231
import { Logo } from "components/ui/Logo"
3332

@@ -171,11 +170,6 @@ const Checkout: React.FC<Props> = ({
171170
</Accordion>
172171
</div>
173172
}
174-
footer={
175-
<>
176-
<Footer onMobile />
177-
</>
178-
}
179173
/>
180174
</CustomerContainer>
181175
)

components/layouts/LayoutDefault.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ import { Container } from "components/ui/Container"
88
interface Props {
99
aside: React.ReactNode
1010
main: React.ReactNode
11-
footer: React.ReactNode
1211
}
1312

14-
export const LayoutDefault: React.FC<Props> = ({ main, aside, footer }) => {
13+
export const LayoutDefault: React.FC<Props> = ({ main, aside }) => {
1514
return (
1615
<Base>
1716
<Container>
@@ -20,7 +19,6 @@ export const LayoutDefault: React.FC<Props> = ({ main, aside, footer }) => {
2019
<Main>
2120
<Card fullHeight>{main}</Card>
2221
</Main>
23-
{footer}
2422
</Wrapper>
2523
</Container>
2624
</Base>

components/ui/Footer/index.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ import tw from "twin.macro"
33

44
import { Logo } from "./cl"
55

6-
interface Props {
7-
onMobile?: boolean
8-
}
9-
10-
export const Footer: React.FC<Props> = ({ onMobile }) => {
6+
export const Footer: React.FC = () => {
117
return (
12-
<Wrapper onMobile={onMobile}>
8+
<Wrapper>
139
<LogoWrapper>
1410
Powered by <Logo width="135" height="22" tw="pl-2" />
1511
</LogoWrapper>
@@ -21,9 +17,9 @@ interface FooterProps {
2117
onMobile?: boolean
2218
}
2319

20+
// ${({ onMobile }) => (onMobile ? tw`fixed md:hidden` : tw`hidden md:flex `)}
2421
const Wrapper = styled.div<FooterProps>`
25-
${({ onMobile }) => (onMobile ? tw`fixed md:hidden` : tw`hidden md:flex `)}
26-
${tw`w-full bottom-0 justify-start items-center border-t px-5 py-2 text-xs text-gray-500 bg-gray-100 z-30 md:(bottom-0 sticky p-0 py-3 m-0 mt-20)`}
22+
${tw`md:flex w-full bottom-0 justify-start items-center border-t px-5 py-2 text-xs text-gray-500 bg-gray-100 z-30 md:(bottom-0 sticky p-0 py-3 m-0 mt-20)`}
2723
2824
&::before {
2925
${tw`hidden md:(block top-0 absolute left-0 w-full z-10 h-2 shadow-top)`}

0 commit comments

Comments
 (0)