mirror of
https://github.com/theoludwig/p61-project.git
synced 2024-07-17 07:00:12 +02:00
31 lines
686 B
TypeScript
31 lines
686 B
TypeScript
import { FlatList } from "react-native"
|
|
import { List } from "react-native-paper"
|
|
|
|
import type { HabitHistory as HabitHistoryType } from "@/domain/entities/HabitHistory"
|
|
import { HabitHistory } from "./HabitHistory"
|
|
|
|
export interface HabitsHistoryProps {
|
|
habitsHistory: HabitHistoryType[]
|
|
}
|
|
|
|
export const HabitsHistory: React.FC<HabitsHistoryProps> = (props) => {
|
|
const { habitsHistory } = props
|
|
|
|
return (
|
|
<List.Section
|
|
style={[
|
|
{
|
|
width: "90%",
|
|
},
|
|
]}
|
|
>
|
|
<FlatList
|
|
data={habitsHistory}
|
|
renderItem={({ item }) => {
|
|
return <HabitHistory habitHistory={item} />
|
|
}}
|
|
/>
|
|
</List.Section>
|
|
)
|
|
}
|