user_data.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import * as React from 'react';
  2. // import Box from '@mui/material/Box';
  3. import CardContent from '@mui/material/CardContent';
  4. import Typography from '@mui/material/Typography';
  5. import Button from '@mui/material/Button';
  6. // import DeleteIcon from '@mui/icons-material/Delete';
  7. // import SendIcon from '@mui/icons-material/Send';
  8. import Stack from '@mui/material/Stack';
  9. import ManageAccountsOutlinedIcon from '@mui/icons-material/ManageAccountsOutlined';
  10. // кнопка редактирования профиля
  11. function UptadeProfile() {
  12. return (
  13. // < Stack direction="row" spacing={2} >
  14. <Button variant="outlined" startIcon={<ManageAccountsOutlinedIcon />} disableRipple>Редактировать аккаунт</Button>
  15. // </Stack >
  16. )
  17. }
  18. // блок пользовательских данных
  19. export default function BasicCard({ userData }) {
  20. return (
  21. <CardContent sx={{ width: '100%', paddingTop: 0 }}>
  22. <Stack direction="row" spacing={5}>
  23. <Typography variant="h5" component="div">
  24. {userData.login}
  25. </Typography>
  26. <UptadeProfile />
  27. </Stack>
  28. <Stack direction="row" spacing={5} marginTop={3}>
  29. <Typography color="text.secondary">
  30. NaN Публикаций
  31. </Typography>
  32. <Typography color="text.secondary">
  33. {userData.followers?.length || '0'} подписчиков
  34. </Typography>
  35. <Typography color="text.secondary">
  36. {userData.following?.length || '0'} подписок
  37. </Typography>
  38. </Stack>
  39. <Typography sx={{ mb: 1.5 }} marginTop={3} variant="body1">
  40. {userData.nick || ''}
  41. </Typography>
  42. </CardContent>
  43. )
  44. }