Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@
.medium .title {
font: var(--web-title4-bold);
color: var(--gray-900);
word-break: break-all;
overflow-wrap: break-word;
}

.medium .meta {
Expand Down Expand Up @@ -287,6 +289,8 @@
display: flex;
flex-direction: column;
gap: 42px;
word-break: break-all;
overflow-wrap: break-word;
}

.large .university {
Expand Down
15 changes: 15 additions & 0 deletions front-end/src/pages/professor/home/modal/CourseModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ const CourseModal = ({ course, onSubmit, onClose }: CourseModalProps) => {
...prev,
name: '강의 이름을 입력해 주세요',
}));
} else if (courseForm.name.length > 35) {
setFormError((prev) => ({
...prev,
name: '강의 이름은 30자 이하로 입력해 주세요',
}));
Comment on lines +243 to +247
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix inconsistent character limit messaging

There's a discrepancy between the check and the error message. The check tests for length > 35, but the error message indicates a 30-character limit.

-            } else if (courseForm.name.length > 35) {
+            } else if (courseForm.name.length > 30) {
               setFormError((prev) => ({
                 ...prev,
                 name: '강의 이름은 30자 이하로 입력해 주세요',
               }));
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
} else if (courseForm.name.length > 35) {
setFormError((prev) => ({
...prev,
name: '강의 이름은 30자 이하로 입력해 주세요',
}));
} else if (courseForm.name.length > 30) {
setFormError((prev) => ({
...prev,
name: '강의 이름은 30자 이하로 입력해 주세요',
}));

} else {
setFormError((prev) => ({ ...prev, name: '' }));
}
Expand Down Expand Up @@ -333,6 +338,11 @@ const CourseModal = ({ course, onSubmit, onClose }: CourseModalProps) => {
...prev,
code: '학수번호를 입력해 주세요',
}));
} else if (courseForm.code.length > 10) {
setFormError((prev) => ({
...prev,
code: '학수번호는 10자 이하로 입력해 주세요',
}));
} else {
setFormError((prev) => ({ ...prev, code: '' }));
}
Expand Down Expand Up @@ -384,6 +394,11 @@ const CourseModal = ({ course, onSubmit, onClose }: CourseModalProps) => {
...prev,
university: '대학이름을 입력해 주세요',
}));
} else if (courseForm.university.length > 20) {
setFormError((prev) => ({
...prev,
university: '대학이름은 20자 이하로 입력해 주세요',
}));
} else {
setFormError((prev) => ({ ...prev, university: '' }));
setCourseForm((prev) => ({
Expand Down