This pull request addresses several Redux user state and rerouting issues, implements layout templates for the dashboard, and adds styling to various components.
Changes
Redux and Rerouting Fixes
Removed setting type to module from package.json.
Integrated Navigate and useSelector to route and render elements conditionally based on the user state in App.js.
Changed the module type of export to default in store.js.
Added returning response data to registerUser function in authService.js.
Refactored thunks to store the response in a variable and return the response in authSlice.js.
Temporarily removed React.StrictMode to fix redundant component mounting on authentication in index.js.
Refactored routing based on Redux state in Login.jsx.
Dashboard Layout and Styling
Implemented styles for HTML elements in index.css.
Added class names to HTML elements in Chat.jsx.
Implemented a simple Newsfeed.jsx component template.
Implemented a simple Profile.jsx component template.
Moved and integrated the Chat component from Dashboard.jsx to Profile.jsx.
Integrated Profile and Newsfeed components in Dashboard.jsx.
Added class names to HTML elements in Dashboard.jsx.
Testing
Verified correct routing and conditional rendering based on Redux state in App.js and Login.jsx.
Ensured that the registerUser function returns the correct response data in authService.js.
Confirmed the temporary removal of React.StrictMode resolves redundant component mounting issues.
Tested the new layout and styling for the dashboard, including the integration of Profile and Newsfeed components.
Additional Information
These changes improve the user experience by fixing routing issues and enhancing the dashboard's layout and styling.
The temporary removal of React.StrictMode will need to be revisited for a permanent solution to redundant component mounting.
Summary
This pull request addresses several Redux user state and rerouting issues, implements layout templates for the dashboard, and adds styling to various components.
Changes
Redux and Rerouting Fixes
package.json
.Navigate
anduseSelector
to route and render elements conditionally based on the user state inApp.js
.store.js
.registerUser
function inauthService.js
.authSlice.js
.React.StrictMode
to fix redundant component mounting on authentication inindex.js
.Login.jsx
.Dashboard Layout and Styling
index.css
.Chat.jsx
.Newsfeed.jsx
component template.Profile.jsx
component template.Dashboard.jsx
toProfile.jsx
.Dashboard.jsx
.Dashboard.jsx
.Testing
App.js
andLogin.jsx
.registerUser
function returns the correct response data inauthService.js
.React.StrictMode
resolves redundant component mounting issues.Profile
andNewsfeed
components.Additional Information
React.StrictMode
will need to be revisited for a permanent solution to redundant component mounting.