Skip to content

Commit

Permalink
style: format code with Prettier (#1307)
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in 0183e74 according to the output
from Prettier.

Details: None

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
  • Loading branch information
deepsource-autofix[bot] committed Dec 9, 2023
1 parent 0183e74 commit f9ed084
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/FriendsComponent/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const FriendsComponent = () => {
const userData = snapshot.docs[0].data();
const fetchedFriends = [];
setName(userData.name);
for (const friendUid of (userData?.Friends || userData?.friends || [])) {
for (const friendUid of userData?.Friends || userData?.friends || []) {
const friendData = await getFriendData(friendUid);
if (friendData) {
fetchedFriends.push({
Expand Down
7 changes: 5 additions & 2 deletions src/pages/Profile/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,12 @@ function Profile() {
bio: data.bio ? data.bio : "Hi there! I am using Dummygram.",
country: data.country ? data.country : "Global",
storyTimestamp: data.storyTimestamp,
Friends: data?.Friends?.length||data?.friends?.length,// same as below
Friends: data?.Friends?.length || data?.friends?.length, // same as below
});
setIsFriendAlready(data?.Friends?.includes(user?.uid)||data?.friends?.includes(user?.uid)); // old accounts have friends attribute and new accounts have Friends attribute
setIsFriendAlready(
data?.Friends?.includes(user?.uid) ||
data?.friends?.includes(user?.uid),
); // old accounts have friends attribute and new accounts have Friends attribute
} else {
setUserExists(false);
}
Expand Down

0 comments on commit f9ed084

Please sign in to comment.