Skip to content

Commit

Permalink
style: format code with Prettier
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in b050394 according to the output
from Prettier.

Details: None
  • Loading branch information
deepsource-autofix[bot] authored Sep 18, 2023
1 parent b050394 commit a8edd36
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 66 deletions.
4 changes: 1 addition & 3 deletions src/components/Navbar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ function Navbar({ onClick, user, setUser }) {
<li
key={id}
className="searched_user_li"
onClick={() =>
navigate(`/user/${user.username}`)
}
onClick={() => navigate(`/user/${user.username}`)}
>
<img
src={user?.photoURL ? user.photoURL : blankImg}
Expand Down
5 changes: 1 addition & 4 deletions src/components/Post/LikesDialogBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ const renderUser = ({ uid, username, photoURL, name, bio }) => (
</Link>
<div>
<section className="like_user_data">
<Link
to={`/user/${username}`}
style={{ textDecoration: "none" }}
>
<Link to={`/user/${username}`} style={{ textDecoration: "none" }}>
<h3 className="like_user_name">{name}</h3>
</Link>
<h5 className="like_user_username">@{username}</h5>
Expand Down
8 changes: 2 additions & 6 deletions src/components/Post/PostNav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ const PostNav = ({
<Flexbetween gap={!fullScreen && "1.6rem"} sx={{ marginInline: "auto" }}>
<Flexbetween
sx={{ cursor: "pointer" }}
onClick={() =>
isAnonymous ? navigate("/signup") : likesHandler()
}
onClick={() => (isAnonymous ? navigate("/signup") : likesHandler())}
>
<IconButton>
{tempLikeCount.indexOf(user?.uid) != -1 ? (
Expand All @@ -74,9 +72,7 @@ const PostNav = ({
<Flexbetween
sx={{ cursor: "pointer" }}
onClick={() => {
isAnonymous
? navigate("/signup")
: setisCommentOpen(true);
isAnonymous ? navigate("/signup") : setisCommentOpen(true);
}}
>
<IconButton sx={{ padding: "2px" }}>
Expand Down
60 changes: 13 additions & 47 deletions src/components/SettingsComponents/Sidebar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,88 +15,54 @@ const SettingsSidebar = () => {
<div className="settings-container">
<div className="settings-sidebar-container">
<ul className="settings-sidebar-sub-container">
<li
className={
location.pathname == "/settings" ? "active" : ""
}
>
<li className={location.pathname == "/settings" ? "active" : ""}>
<Link to={"/settings"}>
<VolumeUpOutlinedIcon className="icon" /> <span>Sound</span>
</Link>
</li>
<li
className={
location.pathname == "/settings/notification"
? "active"
: ""
location.pathname == "/settings/notification" ? "active" : ""
}
>
<Link
className="settings-sidebar-item"
to="/settings/notification"
>
<Link className="settings-sidebar-item" to="/settings/notification">
<NotificationsIcon className="icon" /> <span>Notification</span>
</Link>
</li>
<li
className={
location.pathname == "/settings/about" ? "active" : ""
}
className={location.pathname == "/settings/about" ? "active" : ""}
>
<Link
className="settings-sidebar-item"
to="/settings/about"
>
<Link className="settings-sidebar-item" to="/settings/about">
<InfoOutlinedIcon className="icon" /> <span>About</span>
</Link>
</li>
<li
className={
location.pathname == "/settings/theme" ? "active" : ""
}
className={location.pathname == "/settings/theme" ? "active" : ""}
>
<Link
className="settings-sidebar-item"
to="/settings/theme"
>
<Link className="settings-sidebar-item" to="/settings/theme">
<DarkModeOutlinedIcon className="icon" />
<span>Theme</span>
</Link>
</li>
<li
className={
location.pathname == "/settings/lorem" ? "active" : ""
}
className={location.pathname == "/settings/lorem" ? "active" : ""}
>
<Link
className="settings-sidebar-item"
to="/settings/lorem"
>
<Link className="settings-sidebar-item" to="/settings/lorem">
<SecurityOutlinedIcon className="icon" />
<span>Privacy and Security</span>
</Link>
</li>
<li
className={
location.pathname == "/settings/ipsum" ? "active" : ""
}
className={location.pathname == "/settings/ipsum" ? "active" : ""}
>
<Link
className="settings-sidebar-item"
to="/settings/ipsum"
>
<Link className="settings-sidebar-item" to="/settings/ipsum">
<ContactSupportOutlinedIcon className="icon" /> <span> Help</span>
</Link>
</li>
<li
className={
location.pathname == "/settings/account" ? "active" : ""
}
className={location.pathname == "/settings/account" ? "active" : ""}
>
<Link
className="settings-sidebar-item"
to="/settings/account"
>
<Link className="settings-sidebar-item" to="/settings/account">
<ManageAccountsOutlinedIcon className="icon" />{" "}
<span>Account</span>
</Link>
Expand Down
8 changes: 2 additions & 6 deletions src/components/postView/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,16 +239,12 @@ const PostCommentView = ({ setFetchAgain, fetchAgain, postId, user, post }) => {
src={content.avatar ? content.avatar : BlankImg}
alt={content.displayName}
className="post_view_comment_img"
onClick={() =>
navigate(`/user/${content.username}`)
}
onClick={() => navigate(`/user/${content.username}`)}
/>
<div>
<h4
className="post_view_comment_img_name"
onClick={() =>
navigate(`/user/${content.username}`)
}
onClick={() => navigate(`/user/${content.username}`)}
>
{content.displayName}
</h4>
Expand Down

0 comments on commit a8edd36

Please sign in to comment.