From 57341c90bb154266199fb6889c10af39d646c52a Mon Sep 17 00:00:00 2001 From: primakov Date: Sun, 23 Mar 2025 20:10:43 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=BD=D0=BE=D0=B2=D0=BE=D0=B5=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D0=B5=20'courses.statistics'=20=D0=B2=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=84=D0=B8=D0=B3=D1=83=D1=80=D0=B0=D1=86=D0=B8=D1=8E=20?= =?UTF-8?q?=D0=B8=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD=D0=B5=D0=BD=D1=82=20Course?= =?UTF-8?q?sList=20=D0=B4=D0=BB=D1=8F=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D1=8D=D1=82?= =?UTF-8?q?=D0=BE=D0=B9=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=B8.=20?= =?UTF-8?q?=D0=A2=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20=D1=81=D1=82=D0=B0=D1=82?= =?UTF-8?q?=D0=B8=D1=81=D1=82=D0=B8=D0=BA=D0=B0=20=D0=BA=D1=83=D1=80=D1=81?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B0?= =?UTF-8?q?=D0=B5=D1=82=D1=81=D1=8F=20=D1=82=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=20=D0=B2=D0=BA=D0=BB=D1=8E=D1=87=D0=B5?= =?UTF-8?q?=D0=BD=D0=BD=D0=BE=D0=B9=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8?= =?UTF-8?q?=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bro.config.js | 5 +++++ src/pages/course-list/course-list.tsx | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bro.config.js b/bro.config.js index 96b420c..c376278 100644 --- a/bro.config.js +++ b/bro.config.js @@ -39,6 +39,11 @@ module.exports = { value: '', key: 'course.statistics', }, + 'courses.statistics': { + on: true, + value: '', + key: 'courses.statistics', + }, }, }, config: { diff --git a/src/pages/course-list/course-list.tsx b/src/pages/course-list/course-list.tsx index 2d26d1c..9ebe06d 100644 --- a/src/pages/course-list/course-list.tsx +++ b/src/pages/course-list/course-list.tsx @@ -9,6 +9,7 @@ import { } from '@chakra-ui/react' import { AddIcon } from '@chakra-ui/icons' import { useTranslation } from 'react-i18next' +import { getFeatures } from '@brojs/cli' import { useAppSelector } from '../../__data__/store' import { api } from '../../__data__/api/api' @@ -28,6 +29,10 @@ export const CoursesList = () => { const { t } = useTranslation() const { colorMode } = useColorMode() + // Получаем значения фичей + const features = getFeatures('journal') + const coursesStatistics = features?.['courses.statistics'] + // Создаем API запросы для получения уроков const [getLessons] = api.useLazyLessonListQuery() @@ -99,7 +104,7 @@ export const CoursesList = () => { )} - {!showForm && ( + {!showForm && coursesStatistics && (