fix: 🐛 schema syns inte om kalender är tom (#342)

This commit is contained in:
Kajetan Kazimierczak 2021-04-29 10:47:00 +02:00 committed by GitHub
parent a5694c17bc
commit d9bcc06df3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 10 deletions

View File

@ -3,7 +3,7 @@ import { CalendarItem } from '@skolplattformen/embedded-api'
import { Divider, List, ListItem, Text } from '@ui-kitten/components'
import moment from 'moment'
import React from 'react'
import { Image, ListRenderItemInfo, StyleSheet, View } from 'react-native'
import { ListRenderItemInfo, StyleSheet, View } from 'react-native'
import { Colors, Typography } from '../styles'
import { useChild } from './childContext.component'
import { CalendarOutlineIcon } from './icon.component'
@ -15,12 +15,8 @@ export const Calendar = () => {
const { data } = useCalendar(child)
return !data?.length ? (
<View style={styles.emptyState}>
<Image
source={require('../assets/girls.png')}
style={styles.emptyStateImage}
/>
<Text category="h5">Det ser lite tomt ut i kalendern</Text>
<View>
<Week child={child} />
</View>
) : (
<View>
@ -54,9 +50,6 @@ export const Calendar = () => {
}
const styles = StyleSheet.create({
emptyState: {
flex: 1,
},
emptyStateImage: {
height: 200,
width: '100%',