Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] 주문 상세 페이지 구현 #92

Merged
merged 3 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/orderDetail/orderHistory/orderHistoryStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ const flexCenter = css`
align-items: center;
`;

export const orderHistoryContainerStyle = css`
export const orderHistoryContainerStyle = (theme: Theme) => css`
display: flex;
flex-direction: column;
width: 91.1rem;
height: 29.4rem;
padding: 2.4rem 2.1rem;

background-color: ${theme.colors.white};
`;

export const headerStyle = (theme: Theme) => css`
Expand Down
7 changes: 3 additions & 4 deletions src/components/orderDetail/orderInfo/orderInfoStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const orderInfoComponentStyle = css`
gap: 1.6rem;
width: 91.1rem;
height: 17.6rem;
margin-top: 4.8rem;
`;

export const headerComponentStyle = (theme: Theme) => css`
Expand All @@ -14,15 +15,13 @@ export const headerComponentStyle = (theme: Theme) => css`
width: 91.1rem;
min-height: 5.2rem;
padding-left: 2.1rem;
${theme.fonts.kor.titleBold20}

${theme.fonts.kor.titleBold20}
background-color: ${theme.colors.white};
`;

export const contentComponentStyle = (theme: Theme) => css`
export const contentComponentStyle = css`
display: flex;
gap: 1.5rem;
width: 100%;

background-color: ${theme.colors.white};
`;
4 changes: 3 additions & 1 deletion src/components/orderDetail/orderStatus/orderStatusStyle.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { Theme, css } from '@emotion/react';

export const orderStatusComponentStyle = css`
export const orderStatusComponentStyle = (theme: Theme) => css`
display: flex;
flex-direction: column;
gap: 1.6rem;
align-items: flex-start;
width: 91.1rem;
height: 47.1rem;
padding: 2.4rem;

background-color: ${theme.colors.white};
`;

export const headerComponentStyle = css`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { Theme, css } from '@emotion/react';

export const productRecommandContainer = css`
export const productRecommandContainer = (theme: Theme) => css`
display: flex;
flex-direction: column;
gap: 0.4rem;
width: 91.1rem;
padding: 0.8rem 2.4rem 6.8rem;

background-color: ${theme.colors.white};
`;

export const headerStringStyle = (theme: Theme) => css`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { Theme, css } from '@emotion/react';

export const serviceIntroduceContainer = css`
export const serviceIntroduceContainer = (theme: Theme) => css`
display: flex;
flex-direction: column;
gap: 1.6rem;
width: 91.1rem;
height: 28rem;
padding: 2.4rem 1.6rem;

background-color: ${theme.colors.white};
`;

export const hedarTitleStyle = (theme: Theme) => css`
Expand Down
2 changes: 1 addition & 1 deletion src/components/orderDetail/sideBar/sideBarStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const sideBarComponentStyle = (theme: Theme) => css`
flex-direction: column;
align-items: center;
align-items: flex-end;
width: 36rem;
width: 28rem;
height: 133.4rem;
padding-right: 1.1rem;

Expand Down
19 changes: 19 additions & 0 deletions src/layout/OrderLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import Footer from '@components/footer/Footer';
import OrderHeader from '@components/header/orderHeader/OrderHeader';
import { ReactNode } from 'react';

import { orderLayoutContainerStyle, orderLayoutStyle } from './orderLayoutStyle';

interface LayoutProps {
children: ReactNode;
}

const OrderLayout = ({ children }: LayoutProps) => (
<div css={orderLayoutContainerStyle}>
<OrderHeader />
<main css={orderLayoutStyle}>{children}</main>
<Footer />
</div>
);

export default OrderLayout;
17 changes: 17 additions & 0 deletions src/layout/orderLayoutStyle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Theme, css } from '@emotion/react';

export const orderLayoutContainerStyle = (theme: Theme) => css`
width: 100vw;
margin: 0 auto;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

성희님 pr에서 layout공통으로 만들까 고민하실때 뷰상 유사성이 없어서 안만들어도 된다고 생각했었는데, 이제보니 이런 방법이..! 리드ㄷ ㄷ

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

우리리드짱👍👍

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

layout이 이렇게 공통으로 쓰일 수 있다는 게 완전히 와닿네요!!!


background-color: ${theme.colors.gray2};
`;

export const orderLayoutStyle = css`
display: flex;
gap: 1.2rem;
width: 121.4rem;
margin: 0 auto;
margin-top: 0.6rem;
margin-bottom: 4rem;
`;
22 changes: 21 additions & 1 deletion src/pages/OrderPage.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
const OrderPage = () => <div>OrderPage</div>;
import OrderLayout from 'layout/OrderLayout';
import { SideBarComponent } from '@components/orderDetail/sideBar/sideBar';
import { OrderInfoComponent } from '@components/orderDetail/orderInfo/orderInfo';
import OrderStatusComponent from '@components/orderDetail/orderStatus/orderStatus';
import OrderHistory from '@components/orderDetail/orderHistory/orderHistory';
import ServiceIntroduce from '@components/orderDetail/serviceIntroduce/serviceIntroduce';
import ProductRecommendComponent from '@components/orderDetail/productRecommend/productRecommend';
import { mainComponentStyle } from './orderPageStyle';

const OrderPage = () => (
<OrderLayout>
<SideBarComponent />
<div css={mainComponentStyle}>
<OrderInfoComponent />
<OrderStatusComponent />
<OrderHistory />
<ServiceIntroduce />
<ProductRecommendComponent />
</div>
</OrderLayout>
);

export default OrderPage;
11 changes: 11 additions & 0 deletions src/pages/orderPageStyle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { css } from '@emotion/react';

export const mainComponentStyle = css`
display: flex;
flex-direction: column;
gap: 1.6rem;
`;

export const orderLayoutStyle = css`
margin-top: 0.6rem;
`;