Commit a1222c79 authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

Se creó un hook para obtener los intereses del usuario

parent 5ae371d1
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
import { useDataContext } from "../../common/contexts/data_context"
import { IOption } from "../../common/domain/entities/option"
import { useGet } from "../../hooks/useGet"

export const useGetUserInterests = () => {
    const { profileRepository } = useDataContext()
    const callback = async () => {
        return profileRepository!.getUserInterests();
    }
    const { data, requestStatus } = useGet<IOption[]>(callback);
    return { data, requestStatus };
}
 No newline at end of file