Commit 417e7de6 authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

Se creó un hook que obtiene los intereses del usuario

parent cc6e3bf2
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
import { useDataContext } from "../../common/contexts/data_context"
import { useGet } from "../../hooks/useGet";

export const useGetInterests = () => {
    const { profileRepository } = useDataContext();
    const callback = async () => {
        return profileRepository!.getInterests();
    };
    const { data: interests, requestStatus } = useGet(callback);

    return { interests, requestStatus };
};
 No newline at end of file