Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3066 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3066 Rev 3719
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react';
2
import { Avatar, Typography } from '@mui/material'
2
import { Avatar, Typography } from '@mui/material';
3
 
3
 
4
import { parse } from '@utils'
4
import { parse } from '@utils';
5
 
5
 
6
import StatItem from './StatItem'
6
import StatItem from './StatItem';
7
import Widget from '@components/UI/Widget'
7
import Widget from '@components/UI/Widget';
8
 
8
 
9
export default function GroupWidget({
9
export default function GroupWidget({
10
  group: {
10
  group: {
11
    cover = '',
11
    cover = '',
12
    image = '',
12
    image = '',
13
    name = '',
13
    name = '',
14
    overview = '',
14
    overview = '',
15
    total_members = '',
15
    total_members = '',
16
    group_type = '',
16
    group_type = '',
17
    accessibility = ''
17
    accessibility = ''
18
  }
18
  }
19
}) {
19
}) {
20
  return (
20
  return (
21
    <Widget>
21
    <Widget>
22
      <Widget.Media
22
      <Widget.Media
23
        src={cover}
23
        src={cover}
24
        alt='Profile cover'
24
        alt='Profile cover'
25
        styles={{
25
        styles={{
26
          marginBottom: 'calc(-30px - 1rem)',
26
          marginBottom: 'calc(-30px - 1rem)',
27
          height: '60px',
27
          height: '60px',
28
          objectFit: 'cover'
28
          objectFit: 'cover'
29
        }}
29
        }}
30
      />
30
      />
31
 
31
 
32
      <Widget.Body styles={{ textAlign: 'center' }}>
32
      <Widget.Body styles={{ textAlign: 'center' }}>
33
        <Avatar
-
 
34
          src={image}
-
 
35
          name={name}
-
 
36
          sx={{ width: 60, height: 60, margin: 'auto' }}
33
        <Avatar src={image} name={name} sx={{ width: 60, height: 60, margin: 'auto' }} />
37
        />
-
 
38
        <Typography variant='h2'>{name}</Typography>
34
        <Typography variant='h2'>{name}</Typography>
39
        <Typography>{`${group_type} - ${accessibility}`}</Typography>
35
        <Typography>{`${group_type} - ${accessibility}`}</Typography>
40
        <Typography>{parse(overview)}</Typography>
36
        <Typography>{parse(overview)}</Typography>
41
      </Widget.Body>
37
      </Widget.Body>
42
 
38
 
43
      <StatItem title='Número de miembros' number={total_members} />
39
      <StatItem title='Número de miembros' number={total_members} />
44
    </Widget>
40
    </Widget>
45
  )
41
  );
46
}
42
}