From af36eaa225139e63475e418c723e06165e795c87 Mon Sep 17 00:00:00 2001 From: Aamil13 Date: Fri, 31 May 2024 16:48:27 +0530 Subject: [PATCH] pulled UI-Timeline and implemented it --- src/app/community/[id]/profile/page.tsx | 56 +++++++ src/app/communityprofile/page.tsx | 18 -- src/app/globals.css | 7 +- src/components/Timeline/Post.tsx | 24 ++- src/components/Timeline/ProfileCard.tsx | 4 +- .../CommunityProfileCommentBox.tsx | 37 ----- .../CommunityProfileContainer.tsx | 154 ++++++++++++++---- .../communityProfile/CommunityProfilePost.tsx | 84 ---------- .../CommunityProfileAccesibility.tsx | 2 +- .../CommunityProfileAccount.tsx | 50 +++--- .../CommunityProfileBillings.tsx | 8 +- .../CommunityProfileSettings/Option.tsx | 2 +- src/components/communityProfile/SideBar.tsx | 84 ---------- 13 files changed, 232 insertions(+), 298 deletions(-) create mode 100644 src/app/community/[id]/profile/page.tsx delete mode 100644 src/app/communityprofile/page.tsx delete mode 100644 src/components/communityProfile/CommunityProfileCommentBox.tsx delete mode 100644 src/components/communityProfile/CommunityProfilePost.tsx delete mode 100644 src/components/communityProfile/SideBar.tsx diff --git a/src/app/community/[id]/profile/page.tsx b/src/app/community/[id]/profile/page.tsx new file mode 100644 index 00000000..eb195050 --- /dev/null +++ b/src/app/community/[id]/profile/page.tsx @@ -0,0 +1,56 @@ +'use client' +import Footer from '@/components/Footer/Footer' +import Navbar from '@/components/Timeline/Navbar' +import Modal from '@/components/Timeline/Modal' +import EditProfileModal from '@/components/Timeline/Modals/EditProfileModal' +import ProfileCard from '@/components/Timeline/ProfileCard' +import CommunityProfileContainer from '@/components/communityProfile/CommunityProfileContainer' +import { ModalContentType } from '@/types/global' +import React, { useState } from 'react' + +const sampleUser = { + name: 'Kathryn Murphy', + bio: 'Junior student major at Law, Nagoya University', + university: '3rd Year, Undergraduate, Law', + department: 'Junior student major at Law', + location: 'London, United Kingdom', + email: 'kathrynmurphy@gmail.com', + phone: '+44-3028-3239', + dateOfBirth: 'April 3rd, 2002', + followers: 21, + following: 63, +} + +const Profile = () => { + const [isModalOpen, setIsModalOpen] = useState(false) + const [modalContentType, setModalContentType] = useState() + const [activeTab, setActiveTab] = useState('Profile') + + const handleTabClick = (tab: string) => { + setActiveTab(tab) + } + + const modalContent = (modalContentType: string) => { + switch (modalContentType) { + case 'EditProfileModal': + return + default: + return null + } + } + return ( + <> + setIsModalOpen(false)}> + {modalContentType && modalContent(modalContentType)} + + +
+ + +
+