From ce43eeb19ebe7ef1eb19a5701c685687f1f3dc06 Mon Sep 17 00:00:00 2001 From: PavloDolia Date: Mon, 29 Jul 2024 15:22:22 +0300 Subject: [PATCH] fix sonar issue --- .../tutor-home-page/subjects-step/SubjectsStep.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/containers/tutor-home-page/subjects-step/SubjectsStep.tsx b/src/containers/tutor-home-page/subjects-step/SubjectsStep.tsx index 1a6a089bf..9b43b0f2b 100644 --- a/src/containers/tutor-home-page/subjects-step/SubjectsStep.tsx +++ b/src/containers/tutor-home-page/subjects-step/SubjectsStep.tsx @@ -44,10 +44,7 @@ const SubjectsStep = ({ btnsBox }: SubjectsStepProps) => { const fetchSubjectHandler = () => setSubjectIsFetched(true) const getSubjectsNames = useCallback( - () => - subjectService.getSubjectsNames( - subjects.category && subjects.category._id - ), + () => subjectService.getSubjectsNames(subjects.category?._id || null), [subjects.category] )