import React from 'react';
import { Box, Text, useColorModeValue } from '@chakra-ui/react';
import { joinOnDate } from '../../helper/calcTimestamp';
import { useNavigate } from 'react-router-dom';
import { LightBtn, PrimaryBtn } from '../../utils/Buttons';
import useClickFollow from '../../hooks/useFollowUser';
import defaultProfile from '../../assets/images/default_profile.webp';
const UserProfilePopup = ({
background,
profile,
name,
username,
bio,
work,
location,
education,
joined,
id,
currentUserId,
followers,
backgroundHeight,
pos,
display,
zIndex,
w,
p,
m,
borderRadius,
boxShadow,
}) => {
const navigate = useNavigate();
const { handleClickFollow, loading } = useClickFollow(
{ id, followers },
currentUserId
);
const alreadyFollow = followers.includes(currentUserId);
const ghostColor = useColorModeValue('light.ghostColor', 'dark.ghostColor');
const base70 = useColorModeValue('light.base70', 'dark.base70');
const colorTertiary = useColorModeValue(
'light.colorTertiary',
'dark.colorTertiary'
);
const Content = ({ title, text }) => {
return (
{title}
{text}
);
};
return (
e.stopPropagation()}
>
navigate(`/${username}`)}
/>
navigate(`/${username}`)}
>
{name}
{!alreadyFollow && (
{id === currentUserId ? 'Edit Profile' : 'Follow'}
)}
{alreadyFollow && (
Following
)}
{bio}
{work && }
{location && }
{education && }
{joined && }
);
};
export default UserProfilePopup;