-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To-Do-Project - Elina Eriksson Hult #31
base: main
Are you sure you want to change the base?
Conversation
…g zustand in TodoStore
…plete tasks, completed tasks and added toggle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent setup of global state using Zustand! I just made some small comments about cleaning up the code, but apart from that - it looks super! 💃
src/App.jsx
Outdated
<div> | ||
<Header /> | ||
<TodoForm /> | ||
<TodoList /> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation
src/components/Header.jsx
Outdated
<div> | ||
<header className="header"> | ||
<h1 className="title">To-Do List</h1> | ||
<h2 className="sub-title">Work smarter, Not harder</h2> | ||
<div className="animation-container"> | ||
<Animation /> | ||
</div> | ||
</header> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation
src/components/TodoForm.jsx
Outdated
<form onSubmit={handleSubmit}> | ||
<div className="input-container"> | ||
<label htmlFor="todoInput">New task:</label> | ||
<input | ||
id="todoInput" | ||
type="text" | ||
value={input} | ||
onChange={handleInputChange} | ||
placeholder="Write something here" className="textfield" | ||
/> | ||
<button className="add-task-button" type="submit">Add task</button> | ||
</div> | ||
</form> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good that you're using the form element as well as adding labels to your inputs ⭐
src/components/TodoItem.jsx
Outdated
@@ -0,0 +1,42 @@ | |||
//Component for single task | |||
|
|||
import React from "react"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to import React
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see the hard work on the .jason (it was challenging because it was our first time on Zustand!). Congrats on solve, on my oppinion, the hardest part.
https://elinatodoapp3.netlify.app/