fix: 🐛 wizardEnv fetching

This commit is contained in:
Ravinou 2025-04-10 17:40:45 +02:00
commit db36c806b6
No known key found for this signature in database
GPG key ID: EEEE670C40F6A4D7
3 changed files with 5 additions and 4 deletions

View file

@ -52,7 +52,7 @@ export default function RepoList() {
'Content-type': 'application/json',
},
});
const data = await response.json();
const data: WizardEnvType = await response.json();
setWizardEnv(data);
} catch (error) {
console.log('Fetching datas error');

View file

@ -52,7 +52,8 @@ function SetupWizard(props: SetupWizardProps) {
'Content-type': 'application/json',
},
});
setWizardEnv((await response.json()).wizardEnv);
const data: WizardEnvType = await response.json();
setWizardEnv(data);
} catch (error) {
console.log('Fetching datas error');
}

View file

@ -32,8 +32,8 @@ export default function UserSettings(props: UserSettingsProps) {
'Content-type': 'application/json',
},
});
const data: { wizardEnv: WizardEnvType } = await response.json();
setWizardEnv(data.wizardEnv);
const data: WizardEnvType = await response.json();
setWizardEnv(data);
} catch (error) {
console.log('Fetching datas error');
}