Skip to content

Commit

Permalink
refactor: 푸터 컴포넌트 분리 및 위치 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
hozzijeong committed Oct 15, 2023
1 parent 46dbb99 commit 9402b7f
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 32 deletions.
15 changes: 15 additions & 0 deletions frontend/src/components/@common/Footer/Footer.style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import styled from 'styled-components';

export const Wrapper = styled.footer`
display: flex;
flex-direction: column;
gap: 4px;
height: 200px;
padding: 40px 0;
font: 700 1.6rem/2rem NanumSquareRound;
text-align: center;
border-top: 1px solid ${({ theme }) => theme.color.grayLight};
`;
17 changes: 17 additions & 0 deletions frontend/src/components/@common/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Link } from 'react-router-dom';
import { Wrapper } from './Footer.style';
import { URL_PATH } from 'constants/index';

const Footer = () => {
return (
<Wrapper>
<Link to={URL_PATH.privacy}>개인정보 처리 방침</Link>
<p>
contact:<a href={`mailto: [email protected]`}> [email protected]</a>
</p>
<p>©️ 피움 All rights reserved</p>
</Wrapper>
);
};

export default Footer;
14 changes: 0 additions & 14 deletions frontend/src/pages/@common/Home/Home.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,3 @@ export const ImageArea = styled.div`
height: 128px;
margin-top: 16px;
`;

export const Footer = styled.footer`
display: flex;
flex-direction: column;
gap: 4px;
height: 200px;
padding: 40px 0;
font: 700 1.6rem/2rem NanumSquareRound;
text-align: center;
border-top: 1px solid ${({ theme }) => theme.color.grayLight};
`;
19 changes: 1 addition & 18 deletions frontend/src/pages/@common/Home/index.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
import { useState } from 'react';
import { Link } from 'react-router-dom';
import InstallPrompt from 'components/@common/InstallPrompt';
import Navbar from 'components/@common/Navbar';
import PageLogger from 'components/@common/PageLogger';
import SearchBox from 'components/search/SearchBox';
import {
LogoMessage,
SearchBoxArea,
SearchMessage,
Main,
Image,
ImageArea,
Footer,
} from './Home.style';
import { LogoMessage, SearchBoxArea, SearchMessage, Main, Image, ImageArea } from './Home.style';
import useDictionaryNavigate from 'hooks/dictionaryPlant/useDictionaryPlantNavigate';
import { URL_PATH } from 'constants/index';
import LogoSvg from 'assets/logo.svg';
import LogoWebp from 'assets/logo.webp';

Expand Down Expand Up @@ -44,13 +34,6 @@ const Home = () => {
</SearchBoxArea>
<SearchMessage>피움에 등록된 식물을 검색해 보세요!</SearchMessage>
</Main>
<Footer>
<Link to={URL_PATH.privacy}>개인정보 처리 방침</Link>
<p>
contact:<a href={`mailto: [email protected]`}> [email protected]</a>
</p>
<p>©️ 피움 All rights reserved</p>
</Footer>
<Navbar />
</PageLogger>
);
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/pages/auth/MyPage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { FixedButtonArea } from 'pages/garden/GardenPostList/GardenPostList.style';
import ContentHeader from 'components/@common/ContentHeader';
import Footer from 'components/@common/Footer';
import Navbar from 'components/@common/Navbar';
import PageLogger from 'components/@common/PageLogger';
import SvgFill from 'components/@common/SvgIcons/SvgFill';
Expand Down Expand Up @@ -76,6 +77,7 @@ const MyPage = () => {
</Button>
</ButtonBox>
</Main>
<Footer />
<Navbar />
<FixedButtonArea>
<BottomSheet to="https://forms.gle/rQUAi9GbVwrr7oG2A" target="blank">
Expand Down

0 comments on commit 9402b7f

Please sign in to comment.