Skip to content

Commit

Permalink
remove: 루틴 수정 기능, 방 삭제 탭 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
bbearcookie committed Feb 4, 2024
1 parent da51326 commit 10f677d
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 205 deletions.
2 changes: 0 additions & 2 deletions src/core/api/functions/roomAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ const roomAPI = {
roomId: string;
title: string;
announcement: string;
// TODO: 루틴 수정을 제한하는 요구사항 발생
// routines: string[];
password: string;
certifyTime: number;
maxUserCount: number;
Expand Down
14 changes: 2 additions & 12 deletions src/domain/RoomSetting/hooks/useRoomForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ const useRoomForm = ({ roomId, defaultValues }: useRoomFormProps) => {
title: data.title,
announcement: data.announcement,
certifyTime: data.certifyTime % 24,
// TODO: 루틴 수정을 제한하는 요구사항 발생
// routines: data.routines.map((r) => r.value),
maxUserCount: data.userCount,
password: data.password
},
Expand All @@ -99,19 +97,11 @@ const useRoomForm = ({ roomId, defaultValues }: useRoomFormProps) => {
});

if (error.response?.data?.validation) {
const {
title,
announcement,
routine,
password,
certifyTime,
maxUserCount
} = error.response.data.validation;
const { title, announcement, password, certifyTime, maxUserCount } =
error.response.data.validation;

setError('title', { message: title });
setError('announcement', { message: announcement });
// TODO: 루틴 수정을 제한하는 요구사항 발생
// setError('routines', { message: routine });
setError('password', { message: password });
setError('certifyTime', { message: certifyTime });
setError('userCount', { message: maxUserCount });
Expand Down
1 change: 0 additions & 1 deletion src/domain/RoomSetting/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { default as RoomTab } from './tabs/RoomTab';
export { default as MemberTab } from './tabs/MemberTab';
export { default as RemoveTab } from './tabs/RemoveTab';
export { default as LoadingFallback } from './components/LoadingFallback';
72 changes: 0 additions & 72 deletions src/domain/RoomSetting/tabs/RemoveTab.stories.tsx

This file was deleted.

105 changes: 0 additions & 105 deletions src/domain/RoomSetting/tabs/RemoveTab.tsx

This file was deleted.

8 changes: 1 addition & 7 deletions src/domain/RoomSetting/tabs/RoomTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Input } from '@/shared/Input';
import { LoadingSpinner } from '@/shared/LoadingSpinner';
import { formatHourString } from '@/domain/TimePicker/utils/hour';
import { TIME_RANGE, FORM_LITERAL } from '@/domain/RoomForm/constants/literals';
import { UserCount, Routines, Password } from '@/domain/RoomForm';
import { UserCount, Password } from '@/domain/RoomForm';
import { TimePicker } from '@/domain/TimePicker';
import useRoomForm from '../hooks/useRoomForm';

Expand Down Expand Up @@ -118,12 +118,6 @@ const RoomTab = ({ roomId }: RoomTabProps) => {
)}
</section>

{/* // TODO: 루틴 수정을 제한하는 요구사항 발생 */}
{/* <section className={sectionStyle}>
<label className={labelStyle}>루틴 목록</label>
<Routines />
</section> */}

<section className={sectionStyle}>
<label className={labelStyle}>인원</label>
<UserCount />
Expand Down
6 changes: 0 additions & 6 deletions src/pages/RoomSettingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ const RoomSettingPage = () => {
<MemberTab roomId={roomId} />
</Suspense>
</TabItem>
{/* TODO: 앞으로 사용되지 않을 가능성이 높습니다. */}
{/* <TabItem title="방 삭제">
<Suspense fallback={<LoadingFallback />}>
<RemoveTab roomId={roomId} />
</Suspense>
</TabItem> */}
</Tab>
</ErrorBoundary>
</QueryErrorBoundary>
Expand Down

0 comments on commit 10f677d

Please sign in to comment.