refactor: modal manager types (#18150)

This commit is contained in:
Daniel Dietzler
2025-05-08 00:08:19 +02:00
committed by GitHub
parent 5250269fa4
commit 894545aeed
9 changed files with 32 additions and 26 deletions

View File

@@ -99,7 +99,7 @@
};
const handleCreatePartners = async () => {
const users = await modalManager.open(PartnerSelectionModal, { user });
const users = await modalManager.show(PartnerSelectionModal, { user });
if (!users) {
return;

View File

@@ -37,7 +37,7 @@
}
const handleCreate = async () => {
const result = await modalManager.open(ApiKeyModal, {
const result = await modalManager.show(ApiKeyModal, {
title: $t('new_api_key'),
apiKey: { name: 'API Key' },
submitText: $t('create'),
@@ -55,7 +55,7 @@
},
});
await modalManager.open(ApiKeySecretModal, { secret });
await modalManager.show(ApiKeySecretModal, { secret });
} catch (error) {
handleError(error, $t('errors.unable_to_create_api_key'));
} finally {
@@ -64,7 +64,7 @@
};
const handleUpdate = async (key: ApiKeyResponseDto) => {
const result = await modalManager.open(ApiKeyModal, {
const result = await modalManager.show(ApiKeyModal, {
title: $t('api_key'),
submitText: $t('save'),
apiKey: key,