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

To-Do App #36

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

To-Do App #36

wants to merge 3 commits into from

Conversation

Heleneabrahamsson
Copy link

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.

Well-defined Zustand store and nice that you implemented local storage as well! Have a look at the persist middleware for another time.

Keep up the good work!

@@ -0,0 +1,46 @@
.app-container {
display: flex;
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like all of your code has too much indentation? Set your VSC to be 2 spaces please

Comment on lines +7 to +8
const moveTaskUp = useTaskStore((state) => state.moveTaskUp);
const moveTaskDown = useTaskStore((state) => state.moveTaskDown);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice addition!

Comment on lines +85 to +93
function loadTasksFromLocalStorage() {
const savedTasks = localStorage.getItem(LOCAL_STORAGE_KEY);
return savedTasks ? JSON.parse(savedTasks) : null;
}

// Save tasks to localStorage
function saveTasksToLocalStorage(tasks) {
localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(tasks));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not arrow functions here? 👀

@JennieDalgren
Copy link

Great job with your typescript implementation all requirements met ⭐️, I've checked your code in your repo but cannot see that here in the PR. Doesnt matter, but thats why I'm adding this comment here. I can't comment on your own repo, only the PR

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.

3 participants