Skip to content

Commit

Permalink
🔥 비공개 그룹의 체크박스 컴포넌트 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
ttaerrim committed Feb 1, 2024
1 parent facb1d6 commit 70709fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 62 deletions.
49 changes: 0 additions & 49 deletions app/frontend/src/pages/Groups/Create/GroupJoinTypeCheckbox.tsx

This file was deleted.

14 changes: 1 addition & 13 deletions app/frontend/src/pages/Groups/Create/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { TextLabel, Button } from '@morak/ui';

import { FormInput } from '@/components';

import { GroupJoinTypeCheckbox } from './GroupJoinTypeCheckbox';
import { GroupTypeRadio } from './GroupTypeRadio';
import * as styles from './index.css';
import { GroupCreate } from './types';
Expand All @@ -14,7 +13,6 @@ export function GroupCreatePage() {
control,
handleSubmit,
formState: { isValid },
watch,
} = useForm<GroupCreate>({
defaultValues: {
name: '',
Expand All @@ -24,27 +22,17 @@ export function GroupCreatePage() {
mode: 'all',
});

const groupType = watch('type');

return (
<form
className={styles.container}
// TODO: POST 요청
onSubmit={handleSubmit((data) => console.log(data))}
>
<FormInput label="그룹명" required />
<div className={styles.inputWrapper}>
<TextLabel label="그룹 유형" required />
<GroupTypeRadio control={control} />
</div>
{groupType === 'private' && (
<div className={styles.inputWrapper}>
<TextLabel label="가입 방식" required />
<GroupJoinTypeCheckbox
control={control}
required={groupType === 'private'}
/>
</div>
)}
<Button
type="submit"
theme="primary"
Expand Down

0 comments on commit 70709fa

Please sign in to comment.