Styles.
journal.scss
Component when nothing is selected.
NoteAppBar
HomeScreen structure and design.
Settings store, auth reducer, types, Provider in JournalApp.
First dispatch of an action to our Store.
Use our useForm.js
auth action login and logout.
Thunk Middleware for Asynchronous actions
User registration form.
Form error handling.
Implementing the "validator" library to validate the form fields.
validator.isEmail returns boolean.
the !validator.isEmail is used with the exclamation mark.
uiReducer and Actions.
Step 1: Create a Reducer "uiReducer.js"
Step 2: ui.js
dispatch
useSelector
Get information from state.
Firebase initial setup.
Created a new project in the Firebase Console.
The registration options by email and Google were enabled.
Installed Firebase v8.10.0 using npm command.
Configure Firebase and Google Sign-in.
User registration in Firebase with Email and Password.
Perform user login with Email and Password.
Firebase signInWithEmailAndPassword
when clicking the login button, it is disabled while waiting for the response from the server.
Keep authentication state on reload.
Show a global loading in the application.
Private and Public routes.
SweetAlert2 was installed for error messages.
Name on Sidebar.js
useSelector state.auth.name
The new reducer "notesReducer.js" was created.
Charged the JournalScreen component.
Fetched the state of the "active" property from the Store with the useSelector.
New types for notes were created.
Created "notes" action and saved collection to Firestore with db.
The notes in the JournalEntry component were displayed.
"dayjs" was used to format the date.
Also used "AdvancedFormat" plugin for "Do" format.
Activate a note for editing.
Change the active note by changing the selection.
Update Notes to Firestore.
Created new action startSaveNote.
Refresh sidebar with update note.
SweetAlert2 was used to inform the user that their note has been updated.
Cloudinary account was created
An upload preset was added.
Postman Data for Cloudinary:
We remove the note.
We add animations.
We clean the notes on logout.
Testing in reducers.
Testing in actions.
Testing in notes.test.js
Add try/catch in notes.js
Testing in auth.test.js
Testing in Sidebar, JournalEntry, AppRouter...
End Test.
Create environment variables for firebase configurations.
Type: Feat, Fix, Refactor, Test.
Scope.
Subject.