From 0a7657ad321efb8325026dbf46404d3e91cdd3a7 Mon Sep 17 00:00:00 2001 From: GaelleA Date: Fri, 6 Dec 2024 08:07:37 -0500 Subject: [PATCH] feat(studies): SKFP-1387 fix landing page domain --- src/views/LandingPage/StudiesSection/Carousel/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/LandingPage/StudiesSection/Carousel/index.tsx b/src/views/LandingPage/StudiesSection/Carousel/index.tsx index e9a3d4045..deeb0df69 100644 --- a/src/views/LandingPage/StudiesSection/Carousel/index.tsx +++ b/src/views/LandingPage/StudiesSection/Carousel/index.tsx @@ -5,8 +5,8 @@ import { Button } from 'antd'; import Carousel, { CarouselRef } from 'antd/lib/carousel'; import CarouselCard from 'views/LandingPage/StudiesSection/Carousel/Card'; -import { IStudiesStatistic } from '../../../../services/api/arranger/models'; -import { useGlobals } from '../../../../store/global'; +import { IStudiesStatistic } from 'services/api/arranger/models'; +import { useGlobals } from 'store/global'; import styles from './index.module.css'; @@ -31,13 +31,13 @@ const formatStudies = (studiesStatistics: IStudiesStatistic[] = []) => const studyStats = studiesStatistics.find((studyPart) => studyPart.study_code === study.code); const domain = studyStats?.domain || 'unknown'; const participants = studyStats?.participant_count || 0; - const domainTag = intl.get(`screen.loginPage.studies.tags.${domain}`); + const domainLabel = intl.get(`screen.loginPage.studies.tags.${domain}`) || domain; return { code: study.code, title: intl.get(`screen.loginPage.studies.${study.formattedCode}.name`), description: intl.get(`screen.loginPage.studies.${study.formattedCode}.description`), - tags: domainTag ? [domainTag] : domain ? [domain] : [], + tags: domainLabel ? [domainLabel] : [], participants: participants, }; });