diff --git a/frontend/src/apis/deletes.ts b/frontend/src/apis/deletes.ts index 15fd5fa37..197246894 100644 --- a/frontend/src/apis/deletes.ts +++ b/frontend/src/apis/deletes.ts @@ -2,7 +2,7 @@ import ApiClient from './apiClient'; import { checkStatus } from './apiconfig'; export const deleteCancelChamyo = async (moimId: number) => { - const response = await ApiClient.deleteWithAuth(`moim/${moimId}/comment`, { + const response = await ApiClient.deleteWithAuth(`chamyo`, { moimId, }); await checkStatus(response); diff --git a/frontend/src/components/Button/Button.tsx b/frontend/src/components/Button/Button.tsx index af638d8fb..25282752d 100644 --- a/frontend/src/components/Button/Button.tsx +++ b/frontend/src/components/Button/Button.tsx @@ -3,7 +3,7 @@ import { shapes } from '@_components/Button/Button.style'; interface ButtonProps { shape: 'circle' | 'bar'; - onClick: () => void; + onClick?: () => void; disabled: boolean; children: ReactNode; } diff --git a/frontend/src/components/LoginForm/LoginForm.tsx b/frontend/src/components/LoginForm/LoginForm.tsx index d1d0256a4..e8fc8a82c 100644 --- a/frontend/src/components/LoginForm/LoginForm.tsx +++ b/frontend/src/components/LoginForm/LoginForm.tsx @@ -22,7 +22,6 @@ export default function LoginForm() { e.preventDefault(); const response = await login({ nickname }); - console.log(response); setToken(response.data.accessToken); navigate(ROUTES.main); }; diff --git a/frontend/src/components/MoimCardList/MoimCardList.stories.tsx b/frontend/src/components/MoimCardList/MoimCardList.stories.tsx index 186a8ded5..38880b352 100644 --- a/frontend/src/components/MoimCardList/MoimCardList.stories.tsx +++ b/frontend/src/components/MoimCardList/MoimCardList.stories.tsx @@ -26,6 +26,8 @@ export const Default: Story = { date: '2021-10-30', time: '19:00', place: '서울 마포구 독막로 96 1층', + status: 'MOIMING', + comments: [], maxPeople: 5, currentPeople: 3, isZzimed: true, @@ -112,6 +114,7 @@ export const Default: Story = { profile: 'https://avatars.githubusercontent.com/u/78939596?v=4', role: 'moimee', }, + ], description: '코딩하면서 놀아요', status: 'MOIMING', diff --git a/frontend/src/components/MoimSummary/MoimSummary.stories.tsx b/frontend/src/components/MoimSummary/MoimSummary.stories.tsx index 22a7ebb09..739cd432b 100644 --- a/frontend/src/components/MoimSummary/MoimSummary.stories.tsx +++ b/frontend/src/components/MoimSummary/MoimSummary.stories.tsx @@ -15,7 +15,7 @@ export const Default: Story = { moimInfo: { title: '풋살 할 사람?', authorNickname: `괘안나`, - status: 'COMPLETE', + status: 'COMPLETED', }, }, render: (args) => , diff --git a/frontend/src/components/ProfileList/ProfileList.tsx b/frontend/src/components/ProfileList/ProfileList.tsx index cadc062a9..7feab5030 100644 --- a/frontend/src/components/ProfileList/ProfileList.tsx +++ b/frontend/src/components/ProfileList/ProfileList.tsx @@ -11,7 +11,6 @@ interface ProfileListProps { export default function ProfileList(props: ProfileListProps) { const theme = useTheme(); const { participants } = props; - console.log(participants); return (
참여자
diff --git a/frontend/src/components/Tag/Tag.stories.tsx b/frontend/src/components/Tag/Tag.stories.tsx index a33ccf947..942a71f31 100644 --- a/frontend/src/components/Tag/Tag.stories.tsx +++ b/frontend/src/components/Tag/Tag.stories.tsx @@ -26,14 +26,14 @@ export const RecruitingTag: Story = { export const RecruitingCanceledTag: Story = { args: { - status: 'CANCEL', + status: 'CANCELED', }, render: (args) => , }; export const RecruitingCompletedTag: Story = { args: { - status: 'COMPLETE', + status: 'COMPLETED', }, render: (args) => , }; diff --git a/frontend/src/components/Tag/Tag.style.ts b/frontend/src/components/Tag/Tag.style.ts index 11c9c0ed0..41aa0da7e 100644 --- a/frontend/src/components/Tag/Tag.style.ts +++ b/frontend/src/components/Tag/Tag.style.ts @@ -2,7 +2,7 @@ import { css, Theme } from '@emotion/react'; interface TagBoxProps { theme: Theme; - status: 'MOIMING' | 'COMPLETE' | 'CANCEL'; + status: 'MOIMING' | 'COMPLETED' | 'CANCELED'; } export const tagBox = (props: TagBoxProps) => { const { theme, status } = props; @@ -17,7 +17,7 @@ export const tagBox = (props: TagBoxProps) => { color: ${theme.colorPalette.white[100]}; - background-color: ${status === 'CANCEL' + background-color: ${status === 'CANCELED' ? theme.colorPalette.red[400] : status === 'MOIMING' ? theme.colorPalette.green[200] diff --git a/frontend/src/components/Tag/Tag.tsx b/frontend/src/components/Tag/Tag.tsx index ca9ec5b14..7b1644009 100644 --- a/frontend/src/components/Tag/Tag.tsx +++ b/frontend/src/components/Tag/Tag.tsx @@ -4,7 +4,7 @@ import { HTMLProps } from 'react'; import { useTheme } from '@emotion/react'; interface TagProps extends HTMLProps { - status: 'MOIMING' | 'COMPLETE' | 'CANCEL'; + status: 'MOIMING' | 'COMPLETED' | 'CANCELED'; } export default function Tag(props: TagProps) { @@ -12,7 +12,7 @@ export default function Tag(props: TagProps) { const { status } = props; return (
- {status === 'CANCEL' + {status === 'CANCELED' ? '모임 취소' : status === 'MOIMING' ? '모임중' diff --git a/frontend/src/pages/MoimCreationPage/MoimCreationPage.tsx b/frontend/src/pages/MoimCreationPage/MoimCreationPage.tsx index 82080cc1d..1b671fc39 100644 --- a/frontend/src/pages/MoimCreationPage/MoimCreationPage.tsx +++ b/frontend/src/pages/MoimCreationPage/MoimCreationPage.tsx @@ -6,6 +6,7 @@ import useAddMoim from '@_hooks/mutaions/useAddMoim'; import useMoimInfoInput from './MoimCreatePage.hook'; import { useNavigate } from 'react-router-dom'; import { useState } from 'react'; +import ROUTES from '@_constants/routes'; export default function MoimCreationPage() { const navigate = useNavigate(); @@ -27,7 +28,7 @@ export default function MoimCreationPage() { return ( - navigate(-1)}> + navigate(ROUTES.main)}> 모임등록하기 diff --git a/frontend/src/pages/MoimDetailPage/MoimDetailPage.tsx b/frontend/src/pages/MoimDetailPage/MoimDetailPage.tsx index 5902dfb63..fc348e70d 100644 --- a/frontend/src/pages/MoimDetailPage/MoimDetailPage.tsx +++ b/frontend/src/pages/MoimDetailPage/MoimDetailPage.tsx @@ -42,7 +42,6 @@ export default function MoimDetailPage() { const { mutate: ReopenMoim } = useReopenMoim(); const { mutate: completeMoim } = useCompleteMoin(); const { mutate: cancelChamyo } = useCancelChamyo(); - console.log(moim, role, participants); if ( isLoading || @@ -59,7 +58,7 @@ export default function MoimDetailPage() { -
navigate(-1)}> +
navigate(ROUTES.main)}>
@@ -119,7 +118,11 @@ export default function MoimDetailPage() { 모집 완료하기 ) : ( - ) @@ -128,21 +131,25 @@ export default function MoimDetailPage() { - ) : moim.status === 'COMPLETE' ? ( - ) : ( - ) ) : moim.status === 'MOIMING' ? ( - ) : ( - )} diff --git a/frontend/src/types/index.d.ts b/frontend/src/types/index.d.ts index 2272563c5..fccaa2037 100644 --- a/frontend/src/types/index.d.ts +++ b/frontend/src/types/index.d.ts @@ -9,7 +9,7 @@ export interface MoimInfo { authorNickname: string; participants: Participation[]; description?: string; - status: 'MOIMING' | 'COMPLETE' | 'CANCEL'; + status: 'MOIMING' | 'COMPLETED' | 'CANCELED'; comments: Comment[]; isZzimed: boolean; }