Skip to content
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

Johanna's checklist #45

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open

Johanna's checklist #45

wants to merge 30 commits into from

Conversation

joheri1
Copy link

@joheri1 joheri1 commented Nov 24, 2024

Netlify link

View it live

…components and store component to store folder. Add the CSS styling to index.css, to be as the design I found. Add the form and classNames for the styling to the App component. Install Zustand.
…tall styled-components. Mount the Checklist to App component.
…ent. Add the new components to Checklist compinent.
…ort react to checklist and header components.
…oject. Use Zustand to import task list, title and description.
… size on Requirements and when tasks are done
Copy link
Contributor

@HIPPIEKICK HIPPIEKICK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job with your project Johanna! Your Zustand store is well-defined and structured ⭐ Keep up the good work

* To add: Mark all and task counter.
*/

import React from 'react';
Copy link
Contributor

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

Copy link
Author

@joheri1 joheri1 Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started with not importing it, but got a lot of errors, all saying something about react. So, my two cents of a workaround, to quickly fix this before my demo, was to add that import line because somehow it makes the app work.

I will look into this as soon as I can.

Comment on lines 68 to 73
{/* Input field and Add Task button */}
<InputField
value={newTask}
onChange={(event) => setNewTask(event.target.value)}
placeholder="Write a task..."
/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget labels for inputs

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out! I couldn't find a good way to implement it without displaying the label text, so I left it as it is for now. I’ll try to figure out a way :)

set((state) => ({ //Updates the state by creating a new tasks array
tasks: [
...state.tasks, //Keeps all existing tasks in the array.
{ text, id: crypto.randomUUID(), completed: false },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea to make use of the built-in crypto 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants