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

style: format code with Prettier #1261

Merged
merged 1 commit into from
Sep 18, 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
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
Loading