Multiple Changes
This commit is contained in:
parent
a4ebd7aab3
commit
30dd6590ec
19 changed files with 330 additions and 278 deletions
22
src/view/Components/Taskview/Habitsview/index.tsx
Normal file
22
src/view/Components/Taskview/Habitsview/index.tsx
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import * as React from "react";
|
||||
import HabitItem from "./HabitItem"
|
||||
|
||||
export default function Index(props: any){
|
||||
if(props.habits == undefined) {
|
||||
return (<div id="classDisplay">
|
||||
No habits present.
|
||||
</div>)
|
||||
}
|
||||
else {
|
||||
console.log("habits = " + props.habits);
|
||||
const allHabits = props.habits.map((habit: any) => {
|
||||
return <HabitItem key={habit.id} id={habit.id} habit_text={habit.text} upCount={habit.counterUp} downCount={habit.counterDown} onChange={props.onChange}/>
|
||||
})
|
||||
const display = <div id="classDisplay">
|
||||
<ul>{allHabits}</ul>
|
||||
</div>
|
||||
|
||||
return(display);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue