Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format code with prettier #654

Merged
merged 1 commit into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Loading