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

[FE] 퍼블리싱된 페이지 매끄럽게 연결 #114

Merged
merged 3 commits into from
Jul 25, 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
8 changes: 4 additions & 4 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@emotion/react": "^11.11.4",
"@types/dotenv-webpack": "^7.0.7",
"dotenv-webpack": "^8.1.0",
"haengdong-design": "^0.1.28",
"haengdong-design": "^0.1.29",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.24.1"
Expand Down
2 changes: 1 addition & 1 deletion client/src/constants/routerUrls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ export const ROUTER_URLS = {
eventCreateName: '/event/create/name',
eventCreateComplete: '/event/create/complete',
event: '/event',
eventManage: '/event/:eventId',
eventManage: '/event/:eventId/admin',
home: '/event/:eventId/home',
};
2 changes: 1 addition & 1 deletion client/src/pages/Create/Complete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const CompleteCreateEvent = () => {
description="행사가 성공적으로 개시됐어요 :) 행사 링크를 통해서 참여자 관리가 가능해요. 관리를 위해서 행사 관리 링크를 보관해
주세요."
/>
<FixedButton onClick={() => navigate(`${ROUTER_URLS.event}/${url}`)}>관리 페이지로 이동</FixedButton>
<FixedButton onClick={() => navigate(`${ROUTER_URLS.event}/${url}/admin`)}>관리 페이지로 이동</FixedButton>
</MainLayout>
);
};
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/Create/Name.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const CreateEvent = () => {
onChange={event => setEventTitle(event.target.value)}
placeholder="ex) 행동대장 야유회"
/>
<FixedButton>행동 개시!</FixedButton>
<FixedButton onClick={() => navigate(ROUTER_URLS.eventCreateComplete)}>행동 개시!</FixedButton>
</form>
</MainLayout>
);
Expand Down
24 changes: 10 additions & 14 deletions client/src/pages/Event/Event.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import {useState} from 'react';
import {TopNav, Title, FixedButton, StepItem, InOutItem, MainLayout} from 'haengdong-design';

import StepList from '@components/StepList/StepList';
import {useStepList} from '@hooks/useStepList/useStepList';
import {StepListProvider} from '@hooks/useStepList/useStepList';

import {SetActionModalContent, SetInitialParticipants} from '@components/Modal';

import {ReceiptStyle} from './Event.style';
Expand Down Expand Up @@ -60,30 +64,22 @@ const Event = () => {
const [participants, setParticipants] = useState<string[]>([]);
const [order, setOrder] = useState<number>(0);

const {getTotalPrice} = useStepList();

return (
<MainLayout backgroundColor="gray">
<TopNav navType={'home'} />
<Title
title="행동대장 야유회"
description="“초기인원 설정하기” 버튼을 눌러서 행사 초기 인원을 설정해 주세요."
// TODO: (@soha) price 생성시 총 가격 생기기
price={20000}
price={getTotalPrice()}
/>
<section css={ReceiptStyle}>
{order > 0 && (
// TODO: (@soha) StepList로 변경하기
// TODO: (@soha) order가 0일때 기본 Step 뜨기
<>
<StepItem
name={`${order}차`}
personCount={participants.length}
bills={[
{name: 'QWER', price: 12000, hasDragHandle: true},
{name: '배고파요', price: 12000, hasDragHandle: true},
]}
/>
<InOutItem names={['감자', '고구마']} inOutType={'OUT'} hasDragHandle={true} />
</>
<StepListProvider>
<StepList />
</StepListProvider>
)}
{/* TODO: (@soha) 추후 버튼 width 화면에 맞게 수정 */}
<FixedButton
Expand Down
Loading