feat: use installationCompleted from useAutomatischInfo hook
This commit is contained in:
@@ -44,7 +44,7 @@ function InstallationForm() {
|
|||||||
|
|
||||||
const handleOnRedirect = () => {
|
const handleOnRedirect = () => {
|
||||||
queryClient.invalidateQueries({
|
queryClient.invalidateQueries({
|
||||||
queryKey: ['automatisch', 'config'],
|
queryKey: ['automatisch', 'info'],
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -29,14 +29,16 @@ import adminSettingsRoutes from './adminSettingsRoutes';
|
|||||||
import Notifications from 'pages/Notifications';
|
import Notifications from 'pages/Notifications';
|
||||||
import useAutomatischConfig from 'hooks/useAutomatischConfig';
|
import useAutomatischConfig from 'hooks/useAutomatischConfig';
|
||||||
import useAuthentication from 'hooks/useAuthentication';
|
import useAuthentication from 'hooks/useAuthentication';
|
||||||
|
import useAutomatischInfo from 'hooks/useAutomatischInfo';
|
||||||
import Installation from 'pages/Installation';
|
import Installation from 'pages/Installation';
|
||||||
|
|
||||||
function Routes() {
|
function Routes() {
|
||||||
const { data: configData, isSuccess } = useAutomatischConfig();
|
const { data: automatischInfo, isSuccess } = useAutomatischInfo();
|
||||||
|
const { data: configData } = useAutomatischConfig();
|
||||||
const { isAuthenticated } = useAuthentication();
|
const { isAuthenticated } = useAuthentication();
|
||||||
const config = configData?.data;
|
const config = configData?.data;
|
||||||
|
|
||||||
const installed = isSuccess ? config?.['installation.completed'] === true : true;
|
const installed = isSuccess ? automatischInfo.data.installationCompleted : true;
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
Reference in New Issue
Block a user