Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3528 Rev 3661
Línea 1... Línea 1...
1
import React from 'react';
1
import React from 'react';
2
import { useParams } from 'react-router-dom';
2
import { useParams } from 'react-router-dom';
3
import { Doughnut } from 'react-chartjs-2';
3
import { Doughnut } from 'react-chartjs-2';
4
import { Box, Grid, Typography } from '@mui/material';
4
import { Box, Grid, Typography } from '@mui/material';
Línea 5... Línea 5...
5
 
5
 
-
 
6
import { useAlert, useApi } from '@shared/hooks';
-
 
7
import { getProgress } from '@microlearning/services';
6
import { useFetch } from '@shared/hooks';
8
 
Línea 7... Línea 9...
7
import { Spinner } from '@shared/components';
9
import { Spinner } from '@shared/components';
8
 
10
 
-
 
11
export function ProgressPage() {
-
 
12
  const { uuid } = useParams();
-
 
13
 
9
export function ProgressPage() {
14
  const { showError } = useAlert();
-
 
15
 
-
 
16
  const { data, loading } = useApi(getProgress, {
-
 
17
    autoFetch: true,
-
 
18
    autoFetchArgs: [uuid],
-
 
19
    onError: (error) => {
-
 
20
      showError(error.message);
Línea 10... Línea 21...
10
  const { uuid } = useParams();
21
    }
11
  const { data, loading } = useFetch(`/microlearning/progress/${uuid}`);
22
  });
12
 
23
 
13
  const chartOptions = {
24
  const chartOptions = {