forms
This commit is contained in:
@@ -41,10 +41,12 @@ export const Profile = ({
|
||||
title?: string
|
||||
}) => {
|
||||
// const [rated, setRated] = useState(user.rated || 0)
|
||||
const [editProfile, setEditProfile] = useState(false)
|
||||
|
||||
return (
|
||||
<Box mt={3} borderWidth="1px" p={3} overflowX="hidden">
|
||||
{!isLink && <FormTest />}
|
||||
{!isLink && editProfile && <FormTest name={user.name} />}
|
||||
{!editProfile && <Button onClick={() => setEditProfile(true)}>Редактировать</Button>}
|
||||
<Heading as="h2">{title || 'Данные профиля'}</Heading>
|
||||
<Box m={3}>
|
||||
<Card width={'fit-content'} shadow="2xl">
|
||||
@@ -59,7 +61,7 @@ export const Profile = ({
|
||||
<CardFooter>
|
||||
{features['stars'] && (
|
||||
<Stars
|
||||
count={Number(features['stars']?.value) * 2}
|
||||
count={Number(features['stars']?.value)}
|
||||
userId={user.id}
|
||||
// rated={rated}
|
||||
// setRated={setRated}
|
||||
@@ -68,15 +70,15 @@ export const Profile = ({
|
||||
</CardFooter>
|
||||
</Card>
|
||||
</Box>
|
||||
{!isLink &&
|
||||
{/* {!isLink &&
|
||||
features['buttons'] &&
|
||||
user.friends?.map((friend) => (
|
||||
user.friends?.map((friend) => ( */}
|
||||
<Counter
|
||||
key={friend.id}
|
||||
key={user.id}
|
||||
// value={rated} setValue={setRated}
|
||||
userId={friend.id}
|
||||
userId={user.id}
|
||||
/>
|
||||
))}
|
||||
{/* ))} */}
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user