diff --git a/src/screens/History.tsx b/src/screens/History.tsx index fa8a24a..d6ef1d9 100644 --- a/src/screens/History.tsx +++ b/src/screens/History.tsx @@ -1,14 +1,46 @@ -import { VStack } from '@gluestack-ui/themed'; +import { useState } from 'react'; +import { SectionList } from 'react-native'; +import { Heading, Text, VStack } from '@gluestack-ui/themed'; import { HistoryCard } from '@components/HistoryCard'; import { ScreenHeader } from '@components/ScreenHeader'; +const DATA = [ + { + title: '22.08.2024', + data: ['Puxada frontal', 'Puxada lateral'], + }, + { + title: '23.08.2024', + data: ['Puxada frontal'], + }, +]; + export function History() { + const [exercises, setExercises] = useState(DATA); + return ( - + item} + renderItem={({ item }) => } + renderSectionHeader={({ section }) => ( + + {section.title} + + )} + style={{ paddingHorizontal: 32 }} + contentContainerStyle={exercises.length === 0 && { flex: 1, justifyContent: 'center' }} + ListEmptyComponent={() => ( + + Não há exercícios registrados ainda.{'\n'}Vamos fazer exercícios hoje? + + )} + showsVerticalScrollIndicator={false} + /> ); }