This commit is contained in:
Primakov Alexandr Alexandrovich
2025-01-14 18:28:30 +03:00
parent 0f211115cf
commit 05b5843c08
10 changed files with 243 additions and 76 deletions
+9 -7
View File
@@ -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>
)
}