From 893e71cf95430dcedeb622a24bf0d9c8794f5c81 Mon Sep 17 00:00:00 2001 From: auraticabhi Date: Wed, 13 Mar 2024 20:52:39 +0530 Subject: [PATCH] Made Profile page responsive --- app/layout.tsx | 2 +- app/page.tsx | 2 +- app/profilePage/page.tsx | 17 ++++++++--------- components/profilePage/ProfileCard.tsx | 12 ++++++------ 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/app/layout.tsx b/app/layout.tsx index e97ca8e..caa17fc 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -27,7 +27,7 @@ export default function RootLayout({ -
+
{children}
diff --git a/app/page.tsx b/app/page.tsx index c5139ca..4be8680 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -261,7 +261,7 @@ export default function Home() { {/* subreddit info */} -
+
{/*

diff --git a/app/profilePage/page.tsx b/app/profilePage/page.tsx index 8a852e6..0fc8bdf 100644 --- a/app/profilePage/page.tsx +++ b/app/profilePage/page.tsx @@ -306,7 +306,6 @@ const ProfilePage = (props: Props) => { setLoadingPosts(false); } }; - fetchData(); }, [user, loading, router, postType, loadMore, reload]); @@ -403,7 +402,7 @@ useEffect(() => { {isAnonymous ? 'Anonymous Posts' : 'Normal Posts'}

*/} -
+
Posts @@ -417,10 +416,10 @@ useEffect(() => {
{(postType=='normal'||postType=='anonymous'||postType=='answers')&&
-
+
{postType=='normal'?
Normal
:postType=='anonymous'?
Anonymous
:postType=='answers'?
Answers
:
Coming Soon
}
-
+
@@ -466,7 +465,7 @@ useEffect(() => { : anonymousQuestions && anonymousQuestions.map((post, index) => ( // -
+
))} @@ -491,7 +490,7 @@ useEffect(() => { questions && postType === "normal" && questions.map((post, index) => ( // -
+
)) @@ -503,7 +502,7 @@ useEffect(() => { postType=='saved'?
{ savedPosts.length !== 0 ? ( savedPosts.map((post, index) => ( -
+
)) @@ -542,7 +541,7 @@ useEffect(() => { answers && postType === "answers" && answers.map((post, index) => ( // -
+
)) @@ -579,7 +578,7 @@ useEffect(() => {
) : ( -
+
{isAnonymous ? ( anonymousMorePosts ? ( diff --git a/components/profilePage/ProfileCard.tsx b/components/profilePage/ProfileCard.tsx index a78a20b..8bf4f23 100644 --- a/components/profilePage/ProfileCard.tsx +++ b/components/profilePage/ProfileCard.tsx @@ -11,27 +11,27 @@ const ProfileCard = ({user}: Props) => { const otherUser:boolean=false; return (
-
+
Profile Pic {/*

Write a description about yourself ...

*/}
-
-

{user?.displayName}

-
+
+

{user?.displayName}

+

{0} Followers