Skip to content

Commit

Permalink
remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
bacpactech committed Nov 7, 2024
1 parent eaec66b commit bb2dacb
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 109 deletions.
23 changes: 0 additions & 23 deletions src/app/(withLayout)/profile/[...id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import ProfileCard from '@/components/Timeline/ProfileCard'
import { Skeleton } from '@/components/ui/Skeleton'
import { useCheckSelfProfile } from '@/lib/utils'
import { useGetUserData } from '@/services/user'
import { useUniStore } from '@/store/store'
import { PostType } from '@/types/constants'
import { ModalContentType } from '@/types/global'
import React, { useState } from 'react'
Expand Down Expand Up @@ -41,7 +40,6 @@ export default function Profile({ params }: { params: { id: string } }) {
{isUserProfileDataLoading || !userProfileData ? (
<Skeleton className="w-full h-60 bg-slate-300" />
) : (
//<Spinner />
<UserProfileCard
name={`${firstName} ${lastName}`}
isPremium={true}
Expand All @@ -65,27 +63,6 @@ export default function Profile({ params }: { params: { id: string } }) {
isSelfProfile={isSelfProfile}
/>
)}
{/*<UserProfileCard
name={`${firstName} ${lastName}`}
isPremium={true}
description={bio || ''}
university={university_name || 'Lorem University'}
isVerified={true}
following={followers?.length || 0}
followers={following?.length || 0}
year={study_year || ''}
degree={degree || ''}
major={major || ''}
email={email || ''}
phone={phone_number || '0000'}
location={'Bangalore'}
birthday={dob || ''}
avatarUrl={userProfileData?.profile_dp?.imageUrl || ''}
isVerifiedUniversity={true}
country={country || ''}
setModalContentType={setModalContentType}
setIsModalOpen={setIsModalOpen}
/>*/}
<PostContainer userId={userId} type={PostType.Profile} />
</div>
)
Expand Down
12 changes: 0 additions & 12 deletions src/components/Timeline/UserListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,6 @@ const UserListItem: React.FC<FollowingItemProps> = ({
<LoginButtons onClick={handleFollowClick} variant="shade" size="extra_small">
{userFollowingIDs?.includes(id) ? 'UnFollow' : 'Follow'}
</LoginButtons>
{/*<Popover>
<PopoverTrigger>
<SlOptionsVertical className="text-primary" />
</PopoverTrigger>
<PopoverContent className="relative right-24 bottom-10 w-36 p-5 border-none shadow-lg bg-white shadow-gray-light z-50">
{isChat ? (
<p onClick={() => createUserChat({ userId: id })}>Start-chat</p>
) : (
<p onClick={() => toggleFollow(id)}>{userFollowingIDs?.includes(id) ? 'Un-Follow' : 'Follow'}</p>
)}
</PopoverContent>
</Popover>*/}
</div>
</div>
)
Expand Down
15 changes: 1 addition & 14 deletions src/components/molecules/NavbarUniversityItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,7 @@ export default function NavbarUniversityItem({ setActiveMenu }: any) {
SetcurrClickedID={SetcurrClickedID}
paramGroupId={id}
/>
{/*{communityGroups?.groups > showGroupTill && (
<p onClick={() => setShowGroupTill(showGroupTill + 5)} className="text-neutral-500 text-sm underline text-center mt-2 cursor-pointer">
Load More
</p>
)}*/}

<div className="flex justify-center items-center p-2">
<button onClick={() => setShowNewGroup(true)} className="bg-[#6647FF] py-2 w-11/12 rounded-lg text-white">
Create Group
Expand All @@ -127,15 +123,6 @@ export default function NavbarUniversityItem({ setActiveMenu }: any) {

if (isFetching || isLoading) return <UserListItemSkeleton />

// if (SubscribedData?.community.length === 0)
// return (
// <div className="px-4 w-full">
// <LoginButtons variant="primary" className="w-full">
// Add Your University
// </LoginButtons>{' '}
// </div>
// )

return (
<>
{SubscribedData?.community.length === 0 && (
Expand Down
6 changes: 0 additions & 6 deletions src/components/organisms/PostsContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,20 +223,14 @@ const PostContainer = ({ communityID = '', communityGroupID = '', type, userId =
return <div>{error.message || 'Error loading posts'}</div>
}

//if (timlineDatas.length == 0 || communityDatas.length === 0 || userSelfPosts.length === 0) {
// return <p>No Posts Yet!</p>
//}

return renderPostWithRespectToPathName()
}

return (
<div className="py-8">
{/*{isLoading || timlineDatas?.length < 1 ? ' ' : communityPostIsFetching || communityDatas?.length < 1 ? ' ' : <PostContainerPostTypeSelector />}*/}
<div className="flex flex-col gap-6">
<PostCardRender />
</div>
{/*<div className="flex flex-col gap-6">{!issJoined && type !== PostType.Timeline ? '' : <PostCardRender />}</div>*/}

{imageCarasol.isShow && (
<div className="relative h-screen w-full ">
Expand Down
54 changes: 0 additions & 54 deletions src/components/organisms/ProfileCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,60 +132,6 @@ export function UserProfileCard({
<span className="text-xs">{country}</span>
</div>
</div>
{/*<div className="flex items-center justify-between mb-4">
<div className="flex items-center space-x-4">
<Image src={avatarUrl} alt={name} width={100} height={100} className="rounded-full" />
<div>
<h2 className="text-2xl font-bold">{name}</h2>
{isPremium && <p className="bg-purple-600 text-white">Premium</p>}
</div>
</div>
<LoginButtons>Edit Profile</LoginButtons>
</div>
<p className="text-gray-600 mb-4">{description}</p>
<div className="flex items-center space-x-2 mb-4">
<div className="bg-orange-100 rounded-full p-2">
<Image src="/path-to-university-icon.png" alt="University" width={24} height={24} />
</div>
<span className="font-semibold">{university}</span>
{isVerified && <p className="bg-blue-500 text-white">✓</p>}
</div>
<div className="flex space-x-4 mb-6">
<div>
<span className="font-bold">{following}</span> Following
</div>
<div>
<span className="font-bold">{followers}</span> Followers
</div>
</div>
<div className="grid grid-cols-2 gap-4">
<div className="flex items-center space-x-2">
<FaGraduationCap className="text-gray-400" />
<span>{`${year}, ${major}`}</span>
</div>
<div className="flex items-center space-x-2">
<FaEnvelope className="text-gray-400" />
<span>{email}</span>
</div>
<div className="flex items-center space-x-2">
<FaPhone className="text-gray-400" />
<span>{phone}</span>
</div>
<div className="flex items-center space-x-2">
<FaMapMarkerAlt className="text-gray-400" />
<span>{location}</span>
</div>
<div className="flex items-center space-x-2">
<FaBirthdayCake className="text-gray-400" />
<span>{birthday}</span>
</div>
</div>
*/}
</Card>
)
}

0 comments on commit bb2dacb

Please sign in to comment.