Skip to content

Commit

Permalink
feat(studies): SKFP-1387 fix landing page domain
Browse files Browse the repository at this point in the history
  • Loading branch information
GaelleA committed Dec 6, 2024
1 parent f653e94 commit 0a7657a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/views/LandingPage/StudiesSection/Carousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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,
};
});
Expand Down

0 comments on commit 0a7657a

Please sign in to comment.