Skip to content

Commit

Permalink
Moved saved posts from sidebar to profile (#1126)
Browse files Browse the repository at this point in the history
* Moved saved posts from sidebar to profile

* style: format

---------

Co-authored-by: narayan soni <[email protected]>
  • Loading branch information
Palakkgoyal and narayan954 authored Aug 5, 2023
1 parent f4dd063 commit 0fbcb5e
Show file tree
Hide file tree
Showing 7 changed files with 150 additions and 160 deletions.
9 changes: 0 additions & 9 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const Contributors = React.lazy(() =>
import("./pages/FooterPages/ContributorPage"),
);
// ------------------------------------- Components ------------------------------------------------
const Favorite = React.lazy(() => import("./components/Favorite"));
const Notifications = React.lazy(() => import("./components/Notification"));
const Post = React.lazy(() => import("./components/Post"));
const SideBar = React.lazy(() => import("./components/SideBar"));
Expand Down Expand Up @@ -388,14 +387,6 @@ function App() {
/>

<Route path="*" element={<NotFound />} />
<Route
path="/dummygram/favourites"
element={
<ErrorBoundary inApp={true}>
<Favorite />
</ErrorBoundary>
}
/>
</Routes>
{/* below scroll button must be checked for implementation */}
<FaArrowCircleUp
Expand Down
122 changes: 0 additions & 122 deletions src/components/Favorite.jsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/SideBar/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

.sidebar_user_dropdown_container {
position: absolute;
top: 390px;
top: 333px;
left: 100px;
padding: 0;
border-radius: 10px;
Expand Down
16 changes: 0 additions & 16 deletions src/components/SideBar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import AccountCircleIcon from "@mui/icons-material/AccountCircle";
import AddCircleOutlineIcon from "@mui/icons-material/AddCircleOutline";
import { AiOutlineClose } from "react-icons/ai";
import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
import BookmarksIcon from "@mui/icons-material/Bookmarks";
import { ClickAwayListener } from "@mui/material";
import { Dialog } from "@mui/material";
import ErrorBoundary from "../../reusableComponents/ErrorBoundary";
Expand Down Expand Up @@ -100,21 +99,6 @@ function SideBar({ anonymous }) {
<AddCircleOutlineIcon className="icon" /> <span>Create</span>
</div>
</li>
<li
onClick={() =>
navigate(`/dummygram/${anonymous ? "signup" : "favourites"}`)
}
className={
location.pathname.includes("/dummygram/favourites")
? "activeTab"
: ""
}
>
<div className="sidebar_align">
<BookmarksIcon className="icon" />
<span>Saved</span>
</div>
</li>
<li
onClick={() =>
navigate(`/dummygram/${anonymous ? "signup" : "notifications"}`)
Expand Down
2 changes: 0 additions & 2 deletions src/components/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Caption from "./Post/Caption";
import ChatBox from "./CommunityChat";
import EditProfile from "./EditProfile";
import Favorite from "./Favorite";
import GuestSignInBtn from "./Guest/GuestSignInBtn";
import GuestSignUpBtn from "./Guest/GuestSignUpBtn";
import ImgUpload from "./ImgUpload";
Expand All @@ -19,7 +18,6 @@ export {
Caption,
ChatBox,
EditProfile,
Favorite,
GuestSignInBtn,
GuestSignUpBtn,
ImgUpload,
Expand Down
82 changes: 73 additions & 9 deletions src/pages/Profile/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,55 @@
margin: auto;
}

.feed_btn_container {
margin-left: 17vw;
display: flex;
justify-content: center;
align-items: center;
gap: 40px;
padding: 10px;
}

.feed_change_btn {
font-size: 20px;
display: flex;
justify-content: center;
align-items: center;
padding-top: 15px;
padding-bottom: 10px;
padding-inline: 20px;
cursor: pointer;
background: var(--bg-color);
border: none;
color: var(--text-secondary);
}

.feed_btn_deactivated {
opacity: 0.7;
color: var(--profile-color);
}

.feed_btn_deactivated:hover {
opacity: 1;
}

.feed_btn_activated {
border-top: 4px solid;
}

.feed_btn_text {
margin-left: 8px;
}

.outer-profile-box {
position: relative;
margin-top: 0;
width: 85%;
padding-block: 5px;
padding-inline: 6px;
border: none;
margin: 0rem auto 2rem;
}
.user-details-section {
display: flex;
z-index: 99;
Expand Down Expand Up @@ -231,6 +280,12 @@
transition: all 0.3s ease;
}

.no_posts_msg {
text-align: center;
margin-top: 20px;
margin-bottom: 40px;
}

/* media query */

@media screen and (max-width: 600px) {
Expand Down Expand Up @@ -265,7 +320,25 @@
}
}

@media screen and (max-width: 1200px) {
.background-image-container {
padding: 4em 0 0 8vw;
}

.feed_btn_container {
margin-left: 8vw;
}
}

@media screen and (max-width: 800px) {
.outer-profile-box {
width: calc(100% - 10vw);
}

.feed_btn_container {
margin-left: 0;
}

.background-image-container {
padding: 0 !important;
padding-top: 4em !important;
Expand Down Expand Up @@ -294,15 +367,6 @@
}
}

@media screen and (max-width: 1200px) {
.background-image-container {
padding: 4em 0 0 8vw;
}
.user-details-section {
padding: 0 12vw;
}
}

@media screen and (min-width: 1200px) {
.outer-profile-box {
width: calc(100% - 34vw);
Expand Down
Loading

0 comments on commit 0fbcb5e

Please sign in to comment.