import {
    useGetAuthenticatedUserDataQuery,
} from "../../../Api/usersApi.js";

const useProfilePage = () => {
    const {
        data: userData = {},
        isLoading: isLoadingUserData,
        isError: isErrorUserData,
    } = useGetAuthenticatedUserDataQuery(undefined, {
        pollingInterval: 20000,
    });

    return {
        userData,
        isLoading: isLoadingUserData,
        isError: isErrorUserData,
    };
};

export default useProfilePage;