Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3658 Rev 3659
Línea 4... Línea 4...
4
import { getSlide, markSlideCompleted } from '@microlearning/services';
4
import { getSlide, markSlideCompleted } from '@microlearning/services';
Línea 5... Línea 5...
5
 
5
 
6
export function useSlide(uuid) {
6
export function useSlide(uuid) {
Línea -... Línea 7...
-
 
7
  const [slide, setSlide] = useState(null);
-
 
8
 
7
  const [slide, setSlide] = useState(null);
9
  const { showSuccess, showError } = useAlert();
8
 
10
 
9
  const { loading } = useApi(getSlide, {
11
  const { loading } = useApi(getSlide, {
10
    onSuccess: (data) => {
12
    onSuccess: (data) => {
11
      setSlide(data);
13
      setSlide(data);
Línea 24... Línea 26...
24
    },
26
    },
25
    onError: (error) => {
27
    onError: (error) => {
26
      showError(error.message);
28
      showError(error.message);
27
    }
29
    }
28
  });
30
  });
29
  const { showSuccess, showError } = useAlert();
-
 
Línea 30... Línea 31...
30
 
31
 
31
  return { slide, loading, completeLoading, completeSlide };
32
  return { slide, loading, completeLoading, completeSlide };