Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3654 | Rev 3658 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3654 Rev 3655
Línea 1... Línea 1...
1
import React from 'react';
1
import React from 'react';
2
import { useNavigate, useParams } from 'react-router-dom';
2
import { useNavigate, useParams } from 'react-router-dom';
3
import { Box, Button, Typography } from '@mui/material';
3
import { Box, Button, Typography } from '@mui/material';
Línea -... Línea 4...
-
 
4
 
4
 
5
import { useModal } from '@shared/hooks';
5
import { useCapsule } from '@microlearning/hooks';
6
import { useCapsule } from '@microlearning/hooks';
Línea 6... Línea 7...
6
import { parse } from '@shared/utils';
7
import { parse } from '@shared/utils';
7
 
8
 
Línea 12... Línea 13...
12
  CardMedia,
13
  CardMedia,
13
  CommentList,
14
  CommentList,
14
  Spinner
15
  Spinner
15
} from '@shared/components';
16
} from '@shared/components';
16
import { CapsuleCommentForm, SlideForm } from '@microlearning/components';
17
import { CapsuleCommentForm, SlideForm } from '@microlearning/components';
17
import { useModal } from '@shared/hooks';
-
 
Línea 18... Línea 18...
18
 
18
 
19
export function CapsuleDetailsPage() {
19
export function CapsuleDetailsPage() {
20
  const { uuid } = useParams();
20
  const { uuid } = useParams();
Línea 48... Línea 48...
48
      />
48
      />
49
      <CardContent>
49
      <CardContent>
50
        <Typography variant='h1'>{capsule.name}</Typography>
50
        <Typography variant='h1'>{capsule.name}</Typography>
51
        <Typography>{parse(capsule.description)}</Typography>
51
        <Typography>{parse(capsule.description)}</Typography>
52
        {capsule?.slides?.length > 0 && (
52
        {capsule?.slides?.length > 0 && (
-
 
53
          <Button
-
 
54
            variant='contained'
-
 
55
            color='primary'
53
          <Button variant='contained' color='primary' onClick={showContent}>
56
            onClick={showContent}
-
 
57
            style={{ marginTop: 1, width: '100%' }}
-
 
58
          >
54
            Ver contenido
59
            Ver contenido
55
          </Button>
60
          </Button>
56
        )}
61
        )}
57
      </CardContent>
62
      </CardContent>
Línea 58... Línea 63...
58
 
63
 
59
      <CardActions>
64
      <CardActions>
60
        <Box sx={{ mt: 1, display: 'flex', flexDirection: 'column', gap: 1 }}>
65
        <Box sx={{ display: 'flex', flexDirection: 'column', gap: 1, width: '100%' }}>
61
          <CapsuleCommentForm onSubmit={addComment} />
66
          <CapsuleCommentForm onSubmit={addComment} />
62
          <CommentList comments={capsule.comments} onDelete={deleteComment} />
67
          <CommentList comments={capsule.comments} onDelete={deleteComment} />
63
        </Box>
68
        </Box>
64
      </CardActions>
69
      </CardActions>