diff --git a/src/assets/icon/Complete.svg b/src/assets/icon/Complete.svg new file mode 100644 index 0000000..3e986b0 --- /dev/null +++ b/src/assets/icon/Complete.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/common/Infromation.tsx b/src/components/common/Infromation.tsx new file mode 100644 index 0000000..7570982 --- /dev/null +++ b/src/components/common/Infromation.tsx @@ -0,0 +1,39 @@ +import styled from 'styled-components'; + +interface InfromationProps { + title: string[]; + content: string[]; + color: string[]; +} + +export default function Infromation({ title, content, color }: InfromationProps) { + return ( + <> + {title.map((value, index) => { + return ( + + {value} + {content[index]} + + ); + })} + > + ); +} + +const InfromationContainer = styled.section<{ color: string }>` + display: flex; + flex-direction: row; + justify-content: space-between; + margin-bottom: 3.2rem; + + h1 { + color: ${({ theme }) => theme.colors.light_green}; + font: ${({ theme }) => theme.fonts.M_17}; + } + + p { + color: ${({ color }) => (color === 'gray' ? '#9BA3A2' : color === 'blue' ? '#3674FF' : '#2A3E3B')}; + font: ${({ theme }) => theme.fonts.M_17}; + } +`; diff --git a/src/components/common/Layout.tsx b/src/components/common/Layout.tsx index 4a17729..7e45f55 100644 --- a/src/components/common/Layout.tsx +++ b/src/components/common/Layout.tsx @@ -17,8 +17,10 @@ export default function Layout({ children }: LayoutProps) { {/* 헤더: 확인된 헤더 종류는 2가지, 라우터 체크해서 동적으로 넣어주기 */} {location.pathname === '/' && } - {location.pathname.includes('/post') && } - {location.pathname.includes('/pay') && } + {location.pathname.includes('/done') && } + {location.pathname.match(/pay(?!.*done)/) && } + + {/* 메인 컨텐츠 */} {children} @@ -32,3 +34,9 @@ const Container = styled.section` overflow: scroll; padding: 0 16px; `; + +const BottomLine = styled.div` + height: 0.5px; + background-color: ${({ theme }) => theme.colors.light_green}; + margin: 0 -16px; +`; diff --git a/src/components/pay/Margin.tsx b/src/components/pay/Margin.tsx new file mode 100644 index 0000000..c64e08a --- /dev/null +++ b/src/components/pay/Margin.tsx @@ -0,0 +1,14 @@ +import React from 'react'; +import styled from 'styled-components'; + +interface MarginProps { + height: number; +} + +export default function Margin({ height }: MarginProps) { + return ; +} + +const MarginContainer = styled.section<{ height: number }>` + height: ${({ height }) => `${height}px`}; +`; diff --git a/src/components/pay/PayWarning.tsx b/src/components/pay/PayWarning.tsx index 4428c72..762083a 100644 --- a/src/components/pay/PayWarning.tsx +++ b/src/components/pay/PayWarning.tsx @@ -1,8 +1,10 @@ import FullWidthButton from 'components/common/FullWidthButton'; import React from 'react'; +import { useNavigate } from 'react-router-dom'; import styled from 'styled-components'; export default function PayWarning() { + const navigate = useNavigate(); return ( 결제 전 반드시 읽어주세요! @@ -17,7 +19,7 @@ export default function PayWarning() { { - alert('결제완료 창 이동'); + navigate('/pay/done'); }} color={'black'} /> @@ -30,7 +32,7 @@ const PayWarningContainer = styled.section` flex-direction: column; padding: 2.4rem; background-color: ${({ theme }) => theme.colors.background}; - margin: 0px -16px 3.2rem -16px; + margin: 0px -16px 0 -16px; h1 { color: ${({ theme }) => theme.colors.middle_green}; diff --git a/src/pages/Pay.tsx b/src/pages/pay/Pay.tsx similarity index 97% rename from src/pages/Pay.tsx rename to src/pages/pay/Pay.tsx index 9369899..8277af0 100644 --- a/src/pages/Pay.tsx +++ b/src/pages/pay/Pay.tsx @@ -9,6 +9,7 @@ import Title from 'components/pay/Title'; import InputButton from 'components/common/InputButton'; import Comment from 'components/common/Comment'; import WarningMessage from 'components/pay/WarningMessage'; +import Margin from 'components/pay/Margin'; export default function Pay() { const dummyPost = { @@ -31,6 +32,7 @@ export default function Pay() { return ( + + + + 안전하게 주문이 완료됐습니다! + + 배송 현황은 제시 및 구매내역에서 확인 가능합니다 홈 혹은 프로필의 ‘우측 상단 메뉴’ + + + + + + + + + + + + + + + + + + + + + ); +} + +const MessageContainer = styled.section` + display: flex; + flex-direction: column; + align-items: center; + + margin-top: 32px; + margin-bottom: 50px; + h1 { + color: ${({ theme }) => theme.colors.balck_green}; + font: ${({ theme }) => theme.fonts.B_22}; + margin-top: 22px; + margin-bottom: 8px; + } + + p { + color: ${({ theme }) => theme.colors.light_green}; + font: ${({ theme }) => theme.fonts.R_14}; + text-align: center; + } +`; + +const BorderLine = styled.div` + height: 16px; + background-color: ${({ theme }) => theme.colors.background}; + margin: 16px -16px 3.2rem -16px; +`; diff --git a/src/pages/routes.tsx b/src/pages/routes.tsx index 53ab8a2..d7960ce 100644 --- a/src/pages/routes.tsx +++ b/src/pages/routes.tsx @@ -3,8 +3,9 @@ import { lazy, Suspense } from 'react'; import { BrowserRouter, Routes as PageRoutes, Route as PageRoute } from 'react-router-dom'; const HomePage = lazy(() => import('pages/Home')); -const PayPage = lazy(() => import('pages/Pay')); const PostPage = lazy(() => import('pages/Post')); +const PayPage = lazy(() => import('pages/pay/Pay')); +const PayDonePage = lazy(() => import('pages/pay/PayDone')); export default function Routes() { return ( @@ -12,8 +13,9 @@ export default function Routes() { Loading...}> } /> - } /> } /> + } /> + } />
{content[index]}
+ 배송 현황은 제시 및 구매내역에서 확인 가능합니다 홈 혹은 프로필의 ‘우측 상단 메뉴’ +