diff --git a/src/pages/courses/components/CategoryList/CategoryList.tsx b/src/pages/courses/components/CategoryList/CategoryList.tsx index 000fcc8..059bfa7 100644 --- a/src/pages/courses/components/CategoryList/CategoryList.tsx +++ b/src/pages/courses/components/CategoryList/CategoryList.tsx @@ -12,15 +12,10 @@ import { CategoryItemPropsType } from './CategoryItem'; */ import CategoryListLoading from './CategoryListLoading'; -/** - * Contexts - */ -import { CoursesPageContext } from '@educt/contexts'; - /** * Hooks */ -import { useContext, useEffect } from 'react'; +import { useEffect } from 'react'; import { useRootStore } from '@educt/hooks/useRootStore'; import { useErrorHandler } from 'react-error-boundary'; @@ -43,6 +38,8 @@ const CategoryList: React.FC = ({ render: Item }) => { categoryStore.loadCategories().catch(error => handleError(error)); }, [categoryStore, handleError]); + useEffect(() => coursesStore.setSelectedCategory(null), []); + /** * Loading */