Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/silvankammermann/kickass-tod…
…o-app-team-11 into dev
- Loading branch information
Showing
5 changed files
with
131 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default function Input(props) { | ||
return ( | ||
<> | ||
<input {...props} /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import { useState } from "react"; | ||
import Input from "../Forms/Input"; | ||
|
||
export default function AddTask() { | ||
|
||
const [taskName, setTaskName] = useState(""); | ||
const [importance, setImportance] = useState(0); | ||
const [urgency, setUrgency] = useState(0); | ||
const [repeat, setRepeat] = useState(0); | ||
|
||
const importanceOptions = [ | ||
{ | ||
weight: 1, | ||
name: "Nice to have" | ||
}, | ||
{ | ||
weight: 2, | ||
name: "Quite important" | ||
}, | ||
{ | ||
weight: 3, | ||
name: "F*cking important" | ||
} | ||
]; | ||
|
||
const urgencyOptions = [ | ||
{ | ||
weight: 1, | ||
name: "Maybe one day" | ||
}, | ||
{ | ||
weight: 2, | ||
name: "To be done ASAP" | ||
}, | ||
{ | ||
weight: 3, | ||
name: "Right now!" | ||
} | ||
]; | ||
|
||
const repeatOptions = [ | ||
{ | ||
weight: 1, | ||
name: "Daily" | ||
}, | ||
{ | ||
weight: 2, | ||
name: "Weekly" | ||
}, | ||
{ | ||
weight: 3, | ||
name: "Monthly" | ||
} | ||
]; | ||
|
||
const addTask = async (e) => { | ||
e.preventDefault(); | ||
|
||
}; | ||
|
||
return ( | ||
<> | ||
<h2>Add Task</h2> | ||
<form onSubmit={addTask}></form> | ||
<Input | ||
onChange={e => setTaskName(e.target.value)} | ||
type="text" | ||
value={taskName} | ||
name="taskName" | ||
style={{width: "100%"}} | ||
/> | ||
|
||
|
||
|
||
|
||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters