diff --git a/packages/web/src/components/InstallationForm/index.jsx b/packages/web/src/components/InstallationForm/index.jsx index a21eefda..07b5cac7 100644 --- a/packages/web/src/components/InstallationForm/index.jsx +++ b/packages/web/src/components/InstallationForm/index.jsx @@ -44,7 +44,7 @@ function InstallationForm() { const handleOnRedirect = () => { queryClient.invalidateQueries({ - queryKey: ['automatisch', 'config'], + queryKey: ['automatisch', 'info'], }); }; diff --git a/packages/web/src/routes.jsx b/packages/web/src/routes.jsx index 3c832d86..1f634275 100644 --- a/packages/web/src/routes.jsx +++ b/packages/web/src/routes.jsx @@ -29,14 +29,16 @@ import adminSettingsRoutes from './adminSettingsRoutes'; import Notifications from 'pages/Notifications'; import useAutomatischConfig from 'hooks/useAutomatischConfig'; import useAuthentication from 'hooks/useAuthentication'; +import useAutomatischInfo from 'hooks/useAutomatischInfo'; import Installation from 'pages/Installation'; function Routes() { - const { data: configData, isSuccess } = useAutomatischConfig(); + const { data: automatischInfo, isSuccess } = useAutomatischInfo(); + const { data: configData } = useAutomatischConfig(); const { isAuthenticated } = useAuthentication(); const config = configData?.data; - const installed = isSuccess ? config?.['installation.completed'] === true : true; + const installed = isSuccess ? automatischInfo.data.installationCompleted : true; const navigate = useNavigate(); useEffect(() => {