From 29060ffc9e14f6024c8ac518ca7618ed7b14c75d Mon Sep 17 00:00:00 2001 From: = Date: Tue, 30 Jul 2024 22:56:05 +0530 Subject: [PATCH] feat: added a success message on upgrade success --- .../SecretV2MigrationSection.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/SecretOverviewPage/components/SecretV2MigrationSection/SecretV2MigrationSection.tsx b/frontend/src/views/SecretOverviewPage/components/SecretV2MigrationSection/SecretV2MigrationSection.tsx index b99200930..aee61be19 100644 --- a/frontend/src/views/SecretOverviewPage/components/SecretV2MigrationSection/SecretV2MigrationSection.tsx +++ b/frontend/src/views/SecretOverviewPage/components/SecretV2MigrationSection/SecretV2MigrationSection.tsx @@ -47,7 +47,15 @@ export const SecretV2MigrationSection = () => { const isProjectUpgraded = workspaceDetails?.version === ProjectVersion.V3; + useEffect(() => { + if (isProjectUpgraded && migrateProjectToV3.data) { + createNotification({ type: "success", text: "Project upgrade completed successfully" }); + migrateProjectToV3.reset(); + } + }, [isProjectUpgraded, Boolean(migrateProjectToV3.data)]); + if (isProjectUpgraded || currentWorkspace?.version === ProjectVersion.V3) return null; + const isUpgrading = workspaceDetails?.upgradeStatus === ProjectUpgradeStatus.InProgress; const didProjectUpgradeFailed = workspaceDetails?.upgradeStatus === ProjectUpgradeStatus.Failed; @@ -82,7 +90,8 @@ export const SecretV2MigrationSection = () => { )}

Action Required

- Infisical secrets engine is now 10x faster and allows you to encrypt secrets with your own KMS. Upgrade your project to receive these improvements. + Infisical secrets engine is now 10x faster and allows you to encrypt secrets with your own + KMS. Upgrade your project to receive these improvements. {!isAdmin && "This is an admin only operation."}