fix: hide start-end if we have no schedule
This commit is contained in:
parent
b05dc42a94
commit
616362d14b
|
@ -120,11 +120,6 @@ export const ChildListItem = ({ child, color }: ChildListItemProps) => {
|
|||
/>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<Text category="c2" style={styles.label}>
|
||||
{translate('schedule.start')} - {translate('schedule.end')}
|
||||
</Text>
|
||||
|
||||
<DaySummary child={child} />
|
||||
{scheduleAndCalendarThisWeek.slice(0, 3).map((calendarItem, i) => (
|
||||
<Text category="p1" key={i}>
|
||||
|
|
|
@ -33,6 +33,11 @@ export const DaySummary = ({ child, date = moment() }: DaySummaryProps) => {
|
|||
const gymBag = lessons.some((lesson) => lesson.code === 'IDH')
|
||||
|
||||
return (
|
||||
<>
|
||||
<Text category="c2" style={styles.label}>
|
||||
{translate('schedule.start')} - {translate('schedule.end')}
|
||||
</Text>
|
||||
|
||||
<View style={styles.summary}>
|
||||
<Text category="s1">
|
||||
{lessons[0].timeStart.slice(0, 5)}-
|
||||
|
@ -44,6 +49,7 @@ export const DaySummary = ({ child, date = moment() }: DaySummaryProps) => {
|
|||
: ''}
|
||||
</Text>
|
||||
</View>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -51,4 +57,7 @@ const themedStyles = StyleService.create({
|
|||
summary: {
|
||||
flexDirection: 'row',
|
||||
},
|
||||
label: {
|
||||
marginTop: 10,
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue