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

perf(frontend) : Setup redux toolkit with persist #44

Closed
wants to merge 9 commits into from

Conversation

Arielpetit
Copy link
Collaborator

Please review this PR @stephane-segning @ValantineSuh @Ngha-Boris

Copy link
Collaborator

@valsuh45 valsuh45 left a comment

Choose a reason for hiding this comment

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

Good!

src/app.tsx Outdated
Comment on lines 17 to 20
<div>
<LoginButton />
<LogoutButton />
</div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

The LoginButton and LogoutButton are rendered outside of routes in app.tsx. This means they'll be visible on all pages.
Please @Arielpetit, consider conditionally rendering the buttons based on the isLoggedIn state.

Copy link
Collaborator

@stephane-segning stephane-segning left a comment

Choose a reason for hiding this comment

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

You integrated redux, not redux toolkit. Please read it again here and here. Read first before the single implementation please.

package.json Outdated Show resolved Hide resolved
src/app.tsx Outdated Show resolved Hide resolved
src/components/LoginButton.tsx Outdated Show resolved Hide resolved
src/components/LogoutButton.tsx Outdated Show resolved Hide resolved
src/store/actions.ts Outdated Show resolved Hide resolved
src/store/reducers.ts Outdated Show resolved Hide resolved
@Arielpetit
Copy link
Collaborator Author

Hey please @stephane-segning and @Ngha-Boris review this again

Copy link
Collaborator

@Ngha-Boris Ngha-Boris May 6, 2024

Choose a reason for hiding this comment

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

Hello @Arielpetit what is this file for?

Copy link
Collaborator

@stephane-segning stephane-segning left a comment

Choose a reason for hiding this comment

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

Very good improvement. Now, address these points please

package.json Outdated
@@ -29,6 +32,8 @@
"@eslint/eslintrc": "^3.0.2",
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.22",
"@reduxjs/toolkit": "^2.2.3",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be in dep, not dev dep

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

DOne

Copy link
Collaborator

Choose a reason for hiding this comment

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

Cancel all these changes

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

.husky/pre-commit Outdated Show resolved Hide resolved
.husky/pre-commit Outdated Show resolved Hide resolved
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.

4 participants