diff --git a/frontend/src/components/LogoProvider.jsx b/frontend/src/components/LogoProvider.jsx index c2f4101..49e6343 100644 --- a/frontend/src/components/LogoProvider.jsx +++ b/frontend/src/components/LogoProvider.jsx @@ -1,11 +1,16 @@ import { useQuery } from "@tanstack/react-query"; import { useEffect } from "react"; +import { isAuthReady } from "../constants/authPhases"; +import { useAuth } from "../contexts/AuthContext"; import { settingsAPI } from "../utils/api"; const LogoProvider = ({ children }) => { + const { authPhase, isAuthenticated } = useAuth(); + const { data: settings } = useQuery({ queryKey: ["settings"], queryFn: () => settingsAPI.get().then((res) => res.data), + enabled: isAuthReady(authPhase, isAuthenticated()), }); useEffect(() => {