From 7c5edcd1903be04cc52b3b5b48397af4675558a6 Mon Sep 17 00:00:00 2001 From: Sergey Yarkov Date: Mon, 13 Jun 2022 02:35:25 +0300 Subject: [PATCH] feat: added param on fetching courses --- src/pages/main/main.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/main/main.tsx b/src/pages/main/main.tsx index 8dfc173..6f0d46d 100644 --- a/src/pages/main/main.tsx +++ b/src/pages/main/main.tsx @@ -26,6 +26,7 @@ import { observer } from 'mobx-react'; * Hooks */ import { useFetchCourses, useFetchStat } from '@educt/hooks/queries'; +import { CourseStatusEnum } from '@educt/enums'; /** * Main page @@ -35,7 +36,7 @@ const MainPage: React.FC = () => { userStore: { me }, onlineStore, } = useRootStore(); - const { data: courses } = useFetchCourses({ limit: 3 }); + const { data: courses } = useFetchCourses({ limit: 3, status: CourseStatusEnum.PUBLISHED }); const { data: stat } = useFetchStat(); if (me === null || courses === null || stat === null) return ;