-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pulled UI-Timeline and implemented it
- Loading branch information
1 parent
d73a9a7
commit af36eaa
Showing
13 changed files
with
232 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: '[email protected]', | ||
phone: '+44-3028-3239', | ||
dateOfBirth: 'April 3rd, 2002', | ||
followers: 21, | ||
following: 63, | ||
} | ||
|
||
const Profile = () => { | ||
const [isModalOpen, setIsModalOpen] = useState(false) | ||
const [modalContentType, setModalContentType] = useState<ModalContentType>() | ||
const [activeTab, setActiveTab] = useState<string>('Profile') | ||
|
||
const handleTabClick = (tab: string) => { | ||
setActiveTab(tab) | ||
} | ||
|
||
const modalContent = (modalContentType: string) => { | ||
switch (modalContentType) { | ||
case 'EditProfileModal': | ||
return <EditProfileModal /> | ||
default: | ||
return null | ||
} | ||
} | ||
return ( | ||
<> | ||
<Modal isOpen={isModalOpen} onClose={() => setIsModalOpen(false)}> | ||
{modalContentType && modalContent(modalContentType)} | ||
</Modal> | ||
<Navbar activeTab={activeTab} onTabClick={handleTabClick} /> | ||
<div className="flex justify-center w-full gap-6 mt-20 max-md:flex-col max-md:items-center pb-10 "> | ||
<ProfileCard {...sampleUser} setModalContentType={setModalContentType} setIsModalOpen={setIsModalOpen} isUserProfile={true} /> | ||
<CommunityProfileContainer /> | ||
</div> | ||
<Footer /> | ||
</> | ||
) | ||
} | ||
|
||
export default Profile |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 0 additions & 37 deletions
37
src/components/communityProfile/CommunityProfileCommentBox.tsx
This file was deleted.
Oops, something went wrong.
154 changes: 118 additions & 36 deletions
154
src/components/communityProfile/CommunityProfileContainer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.