Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3416 Rev 3432
Línea 1... Línea 1...
1
import React, { createContext, useCallback } from "react";
1
import React, { createContext, useCallback } from 'react'
Línea 2... Línea 2...
2
 
2
 
Línea 3... Línea 3...
3
import { useFetch } from "@hooks";
3
import { useFetch } from '@hooks'
Línea 4... Línea 4...
4
 
4
 
5
export const MyProgressContext = createContext();
5
export const MyProgressContext = createContext()
6
 
6
 
7
export default function MyProgressProvider({ children }) {
7
export default function MyProgressProvider({ children }) {
8
  const { data: habits, loading: loading } = useFetch(
8
  const { data: habits, isLoading: loading } = useFetch(
Línea 9... Línea 9...
9
    "/helpers/habits-and-skills/my",
9
    '/helpers/habits-and-skills/my',
10
    []
10
    []
11
  );
11
  )
12
 
12
 
Línea 13... Línea 13...
13
  const getHabitById = useCallback(
13
  const getHabitById = useCallback(
14
    (habitId) => habits.find((habit) => habit.uuid === habitId),
14
    (habitId) => habits.find((habit) => habit.uuid === habitId),
15
    [habits]
15
    [habits]
16
  );
16
  )
17
 
17
 
18
  return (
18
  return (