Skip to content

Commit

Permalink
refactor(time): apply missing generic type in useDebounce
Browse files Browse the repository at this point in the history
  • Loading branch information
SWARVY committed Aug 18, 2024
1 parent 8c3fd38 commit 23ea19d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/time/src/shared/hooks/useDebounce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface UseDebounceParams<T> {
}

export default function useDebounce<T>({ value, delay }: UseDebounceParams<T>) {
const [debouncedValue, setDebouncedValue] = useState<unknown>(value);
const [debouncedValue, setDebouncedValue] = useState<T>(value);

useEffect(() => {
const delayDebounceTimer = setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion apps/time/src/widgets/time-table/ui/TimeTableModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ export default function TimeTableModal<
day: selectedDay,
time: selectedPeriod,
major: selectedMajor,
lectureName: debouncedSearchKeyword as string,
lectureName: debouncedSearchKeyword,
cursor: 0,
limit: 10,
}}
Expand Down

0 comments on commit 23ea19d

Please sign in to comment.