Skip to content

Commit

Permalink
remove unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
kaseyliu committed Nov 27, 2023
1 parent 523457e commit 2c311be
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions packages/studywell-frontend/src/components/taskbar/Task.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import React, { useState } from "react";
import { set } from "mongoose";

function Task(props) {
const [task, setTask] = useState({
task: "type here...",
pomodoros: '',
pomodoros: "",
});

function submitTask() {
props.handleSubmit(task);
setTask({ ...task, task: "type here...", pomodoros: '' });
setTask({ ...task, task: "type here...", pomodoros: "" });
}

function handleTaskChange(event) {
Expand All @@ -18,8 +17,8 @@ function Task(props) {
}

function handlePomodoroChange(event) {
const {value} = event.target;
setTask({...task, pomodoros: Number(value) });
const { value } = event.target;
setTask({ ...task, pomodoros: Number(value) });
}

function handleInputClick(event) {
Expand Down Expand Up @@ -49,11 +48,14 @@ function Task(props) {
onChange={handlePomodoroChange}
value={task.pomodoros}
/>
<input type="button" class="submit_task" value="+" onClick={submitTask} />
<input
type="button"
class="submit_task"
value="+"
onClick={submitTask}
/>
</form>
</div>


);
}
export default Task;

0 comments on commit 2c311be

Please sign in to comment.