From 21f36e1998208d7d06a733bd245306d9fe9d54f7 Mon Sep 17 00:00:00 2001 From: Pasichnichenkoilya Date: Sun, 28 Jul 2024 20:55:06 +0300 Subject: [PATCH] Refactor filterOptions, onChangeCity to use specific types instead of unknown --- .../general-info-step/GeneralInfoStep.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/containers/tutor-home-page/general-info-step/GeneralInfoStep.tsx b/src/containers/tutor-home-page/general-info-step/GeneralInfoStep.tsx index 8c950e54ce..5ae050f1d3 100644 --- a/src/containers/tutor-home-page/general-info-step/GeneralInfoStep.tsx +++ b/src/containers/tutor-home-page/general-info-step/GeneralInfoStep.tsx @@ -74,10 +74,10 @@ const GeneralInfoStep = ({ }) const filterOptions = ( - options: unknown[], - state: FilterOptionsState + options: string[], + state: FilterOptionsState ) => { - const defaultFilterOptions = createFilterOptions() + const defaultFilterOptions = createFilterOptions() return defaultFilterOptions(options, state).slice(0, 300) } @@ -99,9 +99,9 @@ const GeneralInfoStep = ({ const onChangeCity = ( event: SyntheticEvent, - value: unknown + value: string | null ) => { - handleNonInputValueChange('city', value as string | null) + handleNonInputValueChange('city', value) } const getUserById = useCallback(