From 464ebd92886995a2288713468baf8dbc1ec67e61 Mon Sep 17 00:00:00 2001 From: Aamil13 Date: Wed, 10 Jul 2024 11:20:57 +0530 Subject: [PATCH 1/2] added multi-image-upload in image selection and removed email from userProfile-edit and added gif in comments/post --- src/app/community/[id]/page.tsx | 2 +- src/app/community/page.tsx | 60 ++++++++++--------- src/app/register/page.tsx | 2 +- .../Timeline/Modals/EditProfileModal.tsx | 21 ------- src/components/Timeline/Post.tsx | 16 +++-- src/components/Timeline/PostInput.tsx | 56 +++++++++++++---- .../universityCommunityCart.tsx | 4 +- src/models/auth.ts | 4 +- src/services/auth.ts | 2 + src/types/constants.ts | 2 +- 10 files changed, 95 insertions(+), 74 deletions(-) diff --git a/src/app/community/[id]/page.tsx b/src/app/community/[id]/page.tsx index bc6ac0b..5cc0a22 100644 --- a/src/app/community/[id]/page.tsx +++ b/src/app/community/[id]/page.tsx @@ -111,7 +111,7 @@ const Page = () => { setIsModalOpen={setIsModalOpen} isUniversity={true} profileDp={userProfileData?.profile_dp?.imageUrl} - media={item?.imageUrl?.imageUrl} + media={item?.imageUrl} /> ))} diff --git a/src/app/community/page.tsx b/src/app/community/page.tsx index 597627f..66563eb 100644 --- a/src/app/community/page.tsx +++ b/src/app/community/page.tsx @@ -4,6 +4,7 @@ import Navbar from '@/components/Timeline/Navbar' import Footer from '@/components/Footer/Footer' import UniversityCard from '@/components/universityCommunity/universityCommunityCart' import { useGetUserSubscribedCommunityGroups } from '@/services/university-community' +import Loading from '../loading' // const data = [ // { @@ -28,37 +29,40 @@ import { useGetUserSubscribedCommunityGroups } from '@/services/university-commu const Page = () => { const { data: SubscribedData, isLoading } = useGetUserSubscribedCommunityGroups() + return ( <> -
-

Joined Communities

- {isLoading ? ( -
Loading
- ) : SubscribedData?.community?.length ? ( -
- {SubscribedData?.community?.map((item: any) => ( - - ))} -
- ) : ( -
-

- You have yet to join university communities! -

-

- Search your university and start connecting with other applicants, current students, or faculty. -

- -
- )} -
+ {isLoading || !SubscribedData ? ( + + ) : ( +
+

Joined Communities

+ {SubscribedData?.community?.length ? ( +
+ {SubscribedData?.community?.map((item: any) => ( + + ))} +
+ ) : ( +
+

+ You have yet to join university communities! +

+

+ Search your university and start connecting with other applicants, current students, or faculty. +

+ +
+ )} +
+ )}