Skip to content

Commit

Permalink
chore(time): rename input change function '-Input' -> 'InputChange'
Browse files Browse the repository at this point in the history
  • Loading branch information
SWARVY committed Aug 18, 2024
1 parent 944877d commit 3e670eb
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions apps/time/src/widgets/time-table/ui/TimeTableModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ interface TimeTableModalDropdownButtonProps

interface TimeTableModalMajorInputProps {
selectedMajor: string[];
handleMajorInput: (major: string) => void;
handleMajorInputChange: (major: string) => void;
}

interface TimeTableModalLectureSearchInputProps {
handleLectureSearchInput: (keyword: string) => void;
handleLectureSearchInputChange: (keyword: string) => void;
}

interface TimeTableModalProps<T> {
Expand Down Expand Up @@ -227,7 +227,7 @@ const TimeTableModalDropdownButton = memo(

const TimeTableModalMajorInput = memo(function TimeTableModalMajorInput({
selectedMajor,
handleMajorInput,
handleMajorInputChange,
}: TimeTableModalMajorInputProps) {
const [inputValue, setInputValue] = useState('');
const [open, setOpen] = useState<boolean>(false);
Expand All @@ -247,7 +247,7 @@ const TimeTableModalMajorInput = memo(function TimeTableModalMajorInput({
{...selectedMajor.map((major) => (
<TimeTableModalDropdownButton
key={major}
onClick={() => handleMajorInput(major)}
onClick={() => handleMajorInputChange(major)}
value={major}
/>
))}
Expand Down Expand Up @@ -276,7 +276,7 @@ const TimeTableModalMajorInput = memo(function TimeTableModalMajorInput({
{...findMajorList.map((major) => (
<Modal.DropdownItem
key={major}
onClick={() => handleMajorInput(major)}
onClick={() => handleMajorInputChange(major)}
selected={selectedMajor.includes(major)}
>
{major}
Expand All @@ -290,15 +290,15 @@ const TimeTableModalMajorInput = memo(function TimeTableModalMajorInput({
});

const TimeTableLectureSearchInput = memo(function TimeTableLectureSearchInput({
handleLectureSearchInput,
handleLectureSearchInputChange,
}: TimeTableModalLectureSearchInputProps) {
return (
<Modal.Item title="강의 검색">
<Input
inputClassName="border-gray-400 px-1 px-1.5 rounded-md"
placeholder="강의명을 입력해주세요"
onChange={(event) =>
handleLectureSearchInput(event.currentTarget.value)
handleLectureSearchInputChange(event.currentTarget.value)
}
/>
</Modal.Item>
Expand Down Expand Up @@ -421,12 +421,14 @@ export default function TimeTableModal<
/>
<TimeTableModalMajorInput
selectedMajor={selectedMajor}
handleMajorInput={(major) =>
handleMajorInputChange={(major) =>
handleFilterItem(major, selectedMajor, setSelectedMajor)
}
/>
<TimeTableLectureSearchInput
handleLectureSearchInput={(keyword) => setSearchKeyword(keyword)}
handleLectureSearchInputChange={(keyword) =>
setSearchKeyword(keyword)
}
/>
<TimeTableLectureTable
selectedValues={{
Expand Down

0 comments on commit 3e670eb

Please sign in to comment.