Skip to content

Commit 085bdcb

Browse files
committed
chore: 커뮤니티 관련 컴포넌트 타입 오류 해결
1 parent 393b949 commit 085bdcb

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

src/pages/Community/CommunityDetail/components/CommentInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface CommentInputProps extends FlexProps {
88
commentId?: number;
99
autoFocus?: boolean;
1010
handleSubmitComment: (content: string, parentCommentId?: number) => void;
11-
userInfo: User;
11+
userInfo?: User;
1212
}
1313

1414
const CommentInput = ({

src/pages/Community/CommunityEdit/schema.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ const formMessage = {
1818
const { type, title, content } = formMessage;
1919

2020
const FormSchema = z.object({
21-
postType: z.enum(['정보 공유', '텃밭 자랑', '질문하기', '기타'], type),
21+
postType: z.enum(
22+
['정보 공유', '텃밭 자랑', '질문하기', '기타', '전체'],
23+
type,
24+
),
2225
title: z.string().min(title.min.value, title.min.message),
2326
content: z
2427
.string({ required_error: content.message })

src/pages/Community/CommunityMain/components/PostType.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const PostType = () => {
77
const postType = useWhisperStore((state) => state.params.postType);
88
const setPostType = useWhisperStore((state) => state.setPostType);
99

10-
const handleClickType = (type: TypePost) => {
10+
const handleClickType = (type: TypePost | '') => {
1111
if (postType === type) {
1212
return;
1313
}

src/pages/Community/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ export type PostType =
22
| 'INFORMATION_SHARE'
33
| 'GARDEN_SHOWCASE'
44
| 'QUESTION'
5-
| 'ETC'
6-
| '';
5+
| 'ETC';
76

87
export type OrderByOptions =
98
| 'COMMENT_COUNT'

0 commit comments

Comments
 (0)