mirror of
https://github.com/Ravinou/borgwarehouse
synced 2026-03-14 22:35:46 +01:00
fix: 🐛 wizardEnv fetching
This commit is contained in:
parent
ff25907bb3
commit
db36c806b6
3 changed files with 5 additions and 4 deletions
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue