Skip to content

Commit

Permalink
Merge pull request #695 from sophiemoustard/COM-3868
Browse files Browse the repository at this point in the history
COM-3868 - remove useless median dot + fix error when no trainers
  • Loading branch information
ulysseferreira authored Dec 18, 2024
2 parents 31d76a8 + 2918e6b commit 182c2e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/screens/explore/BlendedAbout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useState, useMemo } from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
import Markdown from 'react-native-markdown-display';
import { StackScreenProps } from '@react-navigation/stack';
import get from 'lodash/get';
import { RootStackParamList } from '../../../types/NavigationType';
import CompaniDate from '../../../core/helpers/dates/companiDates';
import { ascendingSort } from '../../../core/helpers/dates/utils';
Expand Down Expand Up @@ -63,10 +64,10 @@ const BlendedAbout = ({ route, navigation }: BlendedAboutProps) => {
<Markdown style={markdownStyle(commonStyles.sectionContent)}>{`- ${item}`}</Markdown>
</View>)}
</>}
{!!course.trainers.length && <>
{!!get(course, 'trainers', []).length && <>
<View style={commonStyles.sectionDelimiter} />
<Text style={styles.sectionTitle}>
{formatQuantity('Intervenant·e', course.trainers.length, '·s', false)}
{formatQuantity('Intervenant·e', course.trainers.length, 's', false)}
</Text>
{course.trainers
.map((trainer: TrainerType, index: number) => <TrainerCell key={`trainer_${index}`} trainer={trainer} />)}
Expand Down

0 comments on commit 182c2e0

Please sign in to comment.