Skip to content

Commit

Permalink
refactor : 백엔드 수량으로 일치
Browse files Browse the repository at this point in the history
  • Loading branch information
pipisebastian committed Dec 10, 2023
1 parent a75c200 commit 831bc6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/pages/admin/LibraryManage/Modal/UploadBookModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ const UploadBookModal = ({ open, onClose, bookDetail }: SelectorProps) => {
setAuthorHelperText('저자명을 입력해주세요');
setIsInvalidAuthor(true);
}
if (titleTrim.length > 30) {
if (titleTrim.length > 200) {
setTitleHelperText('도서명은 200자 이내여야 합니다.');
setIsInvalidTitle(true);
}
if (authorTrim.length > 20) {
if (authorTrim.length > 30) {
setAuthorHelperText('저자명은 30자 이내여야 합니다.');
setIsInvalidAuthor(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,7 @@ interface TotalBookNumberProps {
}

const TotalBookNumberSelector = ({ value, setValue }: TotalBookNumberProps) => {
const bookNumberList = [
{ id: 1, content: '1권' },
{ id: 2, content: '2권' },
{ id: 3, content: '3권' },
{ id: 4, content: '4권' },
{ id: 5, content: '5권' },
{ id: 6, content: '6권' },
{ id: 7, content: '7권' },
{ id: 8, content: '8권' },
{ id: 9, content: '9권' },
{ id: 10, content: '10권' },
];
const bookNumberList = Array.from({ length: 20 }, (_, index) => ({ id: index + 1, content: `${index + 1}권` }));

const handleTotalBookNumberChange = (event: SelectChangeEvent<unknown>) => {
setValue(Number(event.target.value as string));
Expand Down

0 comments on commit 831bc6f

Please sign in to comment.