Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3218 Rev 3336
Línea 3... Línea 3...
3
import { useFetch } from '@hooks'
3
import { useFetch } from '@hooks'
Línea 4... Línea 4...
4
 
4
 
Línea 5... Línea 5...
5
export const HabitsUrlsContext = createContext()
5
export const HabitsUrlsContext = createContext()
6
 
6
 
-
 
7
export default function HabitsUrlsProvider({ children }) {
Línea 7... Línea 8...
7
export default function HabitsUrlsProvider({ children }) {
8
  const { data, isLoading: loading } = useFetch('/habits')
8
  const { data: links, isLoading: loading } = useFetch('/habits')
9
  const { categories, emojis, ...links } = data
9
 
10
 
10
  return (
11
  return (
11
    <HabitsUrlsContext.Provider value={{ loading, links }}>
12
    <HabitsUrlsContext.Provider value={{ loading, links, categories, emojis }}>
12
      {children}
13
      {children}