Skip to content

Commit

Permalink
style: format code with prettier
Browse files Browse the repository at this point in the history
Format code with prettier

This commit fixes the style issues introduced in 18916fd according to the output
from Prettier.

Details: https://app.deepsource.com/gh/narayan954/dummygram/transform/d4f1ea10-e329-41db-977b-43af78e9c5aa/
  • Loading branch information
deepsource-autofix[bot] committed Jul 4, 2023
1 parent 18916fd commit c67c79d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 28 deletions.
10 changes: 5 additions & 5 deletions src/components/SideBar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ function SideBar() {
state: {
name: user.displayName,
email: user.email,
avatar: user.photoURL
}
avatar: user.photoURL,
},
})
}
>
Expand All @@ -84,7 +84,7 @@ function SideBar() {

<Dialog
PaperProps={{
className: "dialogStyle"
className: "dialogStyle",
}}
open={openNewUpload}
onClose={() => setOpenNewUpload(false)}
Expand All @@ -93,7 +93,7 @@ function SideBar() {
style={{
backgroundColor: "var(--bg-color)",
textAlign: "center",
color: "var(--color)"
color: "var(--color)",
}}
>
<AiOutlineClose
Expand All @@ -115,4 +115,4 @@ function SideBar() {
);
}

export default SideBar;
export default SideBar;
51 changes: 28 additions & 23 deletions src/components/postView/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { Avatar, ClickAwayListener, Typography, useMediaQuery } from "@mui/material";
import {
Avatar,
ClickAwayListener,
Typography,
useMediaQuery,
} from "@mui/material";
import {
CommentForm,
CommentItem,
Expand All @@ -7,7 +12,7 @@ import {
PostGridItem,
PostGridItemContainer,
PostHeader,
PostViewGrid
PostViewGrid,
} from "../../pages/PostView/PostViewStyled.jsx";
import React, { useEffect } from "react";
import { doc, updateDoc } from "firebase/firestore";
Expand All @@ -29,15 +34,15 @@ const ImageSlider = React.lazy(() =>
);
const ReadMore = React.lazy(() => import("../ReadMore"));
const PostCommentView = ({
setFetchAgain,
shareModal,
fetchAgain,
postId,
user,
post,
setLink,
setPostText
}) => {
setFetchAgain,
shareModal,
fetchAgain,
postId,
user,
post,
setLink,
setPostText,
}) => {
const navigate = useNavigate();
const theme = useTheme();
const fullScreen = useMediaQuery(theme.breakpoints.down("md"));
Expand Down Expand Up @@ -67,7 +72,7 @@ const PostCommentView = ({
}

const data = {
likecount: tempLikeCount
likecount: tempLikeCount,
};
await updateDoc(docRef, data)
.then(() => setFetchAgain(!fetchAgain))
Expand All @@ -85,7 +90,7 @@ const PostCommentView = ({
db.collection("posts").doc(postId).collection("comments").add({
text: commentValue,
username: user.displayName,
timestamp: firebase.firestore.FieldValue.serverTimestamp()
timestamp: firebase.firestore.FieldValue.serverTimestamp(),
});
commentRef.current.value = "";
}
Expand All @@ -108,7 +113,7 @@ const PostCommentView = ({
setComments(
snapshot.docs.map((doc) => ({
id: doc.id,
content: doc.data()
content: doc.data(),
}))
);
});
Expand Down Expand Up @@ -139,7 +144,7 @@ const PostCommentView = ({
imageUrl: url,
imageWidth: 0,
imageHeight: 0,
thumbnail: null
thumbnail: null,
}));
}

Expand Down Expand Up @@ -211,16 +216,16 @@ const PostCommentView = ({
"&:hover": {
boxShadow: "rgba(100, 100, 111, 0.2) 0px 7px 17px 0px",
border: "2px solid black",
scale: "1.1"
}
scale: "1.1",
},
}}
onClick={() => {
navigate("/dummygram/profile", {
state: {
name: username,
avatar: avatar,
email: email
}
email: email,
},
});
}}
/>
Expand Down Expand Up @@ -290,7 +295,7 @@ const PostCommentView = ({
style={{ zIndex: 999 }}
onEmojiClick={onEmojiClick}
previewConfig={{
showPreview: false
showPreview: false,
}}
/>
</div>
Expand All @@ -310,7 +315,7 @@ const PostCommentView = ({
backgroundColor: "var(--bg-color)",
color: "var(--color)",
borderRadius: "22px",
margin: "4px 0px"
margin: "4px 0px",
}}
/>
<button
Expand All @@ -320,7 +325,7 @@ const PostCommentView = ({
onClick={postComment}
style={{
fontWeight: "bold",
textTransform: "uppercase"
textTransform: "uppercase",
}}
>
Post
Expand Down Expand Up @@ -364,4 +369,4 @@ const PostCommentView = ({
</PostViewGrid>
);
};
export default PostCommentView;
export default PostCommentView;

0 comments on commit c67c79d

Please sign in to comment.