Skip to content

Commit

Permalink
fix: board util type 변환 수정 (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinoov authored Jul 16, 2024
1 parent ed38ddd commit 0da3ca1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export default function BoardJobWriteSection({ postId }: { postId: number }) {
</Radio.Group>
</Form.Item>
<Form.Item label="마감일자">
<DatePicker value={dayjs(form.values.deadline)} onChange={(_, date) => date && form.setFieldValue('deadline', date)} />
<DatePicker value={dayjs(form.values.deadline)} onChange={(_, date) => date && form.setFieldValue('deadline', Array.isArray(date) ? date[0] : date)} />
</Form.Item>
<div>
<Editor initialEditType="wysiwyg" ref={editorRef} onChange={onEditorChange} />
Expand Down
10 changes: 5 additions & 5 deletions apps/web-client/src/lib/utils/boardUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ export type BoardType = 'NOTICE' | 'FREE' | 'JOB' | 'PROJECT' | 'CS';

export function getBoardTitleByBoardType(boardType: BoardType) {
return match(boardType)
.with('NOTICE', () => '공지 게시판')
.with('FREE', () => '자유 게시판')
.with('JOB', () => '취업 게시판')
.with('PROJECT', () => '프로젝트 게시판')
.with('CS', () => 'CS 게시판')
.with('NOTICE', () => 'notice')
.with('FREE', () => 'free')
.with('JOB', () => 'job')
.with('PROJECT', () => 'project')
.with('CS', () => 'cs')
.exhaustive();
}

Expand Down

0 comments on commit 0da3ca1

Please sign in to comment.