Skip to content

Commit 5ad04e5

Browse files
committed
feat: 옵션페이지 약관페이지 추가
1 parent 28f74ad commit 5ad04e5

File tree

6 files changed

+71
-5
lines changed

6 files changed

+71
-5
lines changed

src/layouts/PolicyShowLayout.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { FC, ReactNode } from 'react';
2+
import HistoryBackButton from '@/components/common/HistoryBackButton';
3+
4+
interface Props {
5+
children: ReactNode;
6+
title: string;
7+
}
8+
9+
const PolicyShowLayout: FC<Props> = ({ children, title }) => {
10+
return (
11+
<main className={'relative m-auto h-screen w-fit p-8'}>
12+
<HistoryBackButton />
13+
<h2 className="my-5 text-xl font-semibold">{title}</h2>
14+
{/* <div className="card h-5/6 max-w-5xl bg-white">{children}</div> */}
15+
<div className="card h-3/4 max-w-5xl bg-white">{children}</div>
16+
</main>
17+
);
18+
};
19+
20+
export default PolicyShowLayout;

src/layouts/UseTermsShowLayout.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { FC, ReactNode } from 'react';
2+
import HistoryBackButton from '@/components/common/HistoryBackButton';
3+
4+
interface Props {
5+
children: ReactNode;
6+
title: string;
7+
}
8+
9+
const UseTermsShowLayout: FC<Props> = ({ children, title }) => {
10+
return (
11+
<main className={'relative m-auto h-screen w-fit p-8'}>
12+
<HistoryBackButton />
13+
<h2 className="my-5 text-xl font-semibold">{title}</h2>
14+
{/* <div className="card h-5/6 max-w-5xl bg-white">{children}</div> */}
15+
<div className="card h-3/4 max-w-5xl bg-white">{children}</div>
16+
</main>
17+
);
18+
};
19+
20+
export default UseTermsShowLayout;

src/main.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ const router = createBrowserRouter([
7171
children: [
7272
{
7373
path: 'personalInfo',
74-
element: <Policy.PersonalInfoPage />,
74+
element: <Policy.PersonalInfoShowPage />,
7575
},
7676
{
7777
path: 'usecondition',
78-
element: <Policy.UseConditionPage />,
78+
element: <Policy.UseConditionShowPage />,
7979
},
8080
],
8181
},
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { FC } from 'react';
2+
import PolicyShowLayout from '@/layouts/PolicyShowLayout';
3+
import PolicyPersonalInfo from '../../components/Policy/PolicyPersonalInfo';
4+
5+
const PersonalInfoShowPage: FC = () => {
6+
return (
7+
<PolicyShowLayout title="개인정보 처리방침">
8+
<PolicyPersonalInfo />
9+
</PolicyShowLayout>
10+
);
11+
};
12+
13+
export default PersonalInfoShowPage;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { FC } from 'react';
2+
import PolicyUseCondition from '../../components/Policy/PolicyUseCondition';
3+
import UseTermsShowLayout from '@/layouts/UseTermsShowLayout';
4+
5+
const UseConditionShowPage: FC = () => {
6+
return (
7+
<UseTermsShowLayout title="전자상거래 표준약관">
8+
<PolicyUseCondition />
9+
</UseTermsShowLayout>
10+
);
11+
};
12+
13+
export default UseConditionShowPage;

src/pages/Policy/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import PersonalInfoPage from './PersonalInfoPage';
2-
import UseConditionPage from './UseConditionPage';
1+
import PersonalInfoShowPage from './PersonalInfoShowPage';
2+
import UseConditionShowPage from './UseConditionShowPage';
33

4-
export { PersonalInfoPage, UseConditionPage };
4+
export { PersonalInfoShowPage, UseConditionShowPage };

0 commit comments

Comments
 (0)