Skip to content

Sign in page#347

Open
Nethmini17 wants to merge 11 commits intofcodelabs:nethminifrom
Nethmini17:sign-in-page
Open

Sign in page#347
Nethmini17 wants to merge 11 commits intofcodelabs:nethminifrom
Nethmini17:sign-in-page

Conversation

@Nethmini17
Copy link

No description provided.

src/.env Outdated
@@ -0,0 +1 @@
REACT_APP_FIREBASE_KEY=AIzaSyCkKPnWO88ZHGUaazFntf_e4uuf2xIPBmQ No newline at end of file
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 commit the env file

Comment on lines 27 to 36
const characters =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";

let result = "";

for (let i = 0; i < 8; i++) {
const randomIndex = Math.floor(Math.random() * characters.length);
result += characters.charAt(randomIndex);
}
setRandomString(result);

Copy link
Contributor

Choose a reason for hiding this comment

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

use a random name generator. store some names in an array and pick a random one from there

Comment on lines +7 to +11
authDomain: "dear-diary-emailusername-5f60d.firebaseapp.com",
projectId: "dear-diary-emailusername-5f60d",
storageBucket: "dear-diary-emailusername-5f60d.appspot.com",
messagingSenderId: "71014166140",
appId: "1:71014166140:web:fbe2e46b2a929925ed23f9"
Copy link
Contributor

Choose a reason for hiding this comment

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

store all of these values in the env file


export const { addUser, setUsers } = userSlice.actions;

export const fetchUsers = () => async (dispatch: any) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

use saga to call APIs don't directly call them inside UI or inside the slice

Copy link
Contributor

@shamal-iroshan shamal-iroshan left a comment

Choose a reason for hiding this comment

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

fix commented things

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