fix(status): fix import status message (#4325)

Co-authored-by: Dmitry Mukovkin <d.mukovkin@cft.ru>
This commit is contained in:
Dmitry
2024-09-11 14:35:05 +07:00
committed by GitHub
parent 53839e1091
commit 35cc8c247d
3 changed files with 13 additions and 11 deletions

View File

@@ -401,15 +401,17 @@ const HoppMyCollectionsExporter: ImporterOrExporter = {
"hoppscotch-personal-collections" "hoppscotch-personal-collections"
) )
E.isRight(message) if (E.isRight(message)) {
? toast.success(t(message.right)) toast.success(t("state.download_started"))
: toast.error(t(message.left))
platform.analytics?.logEvent({ platform.analytics?.logEvent({
type: "HOPP_EXPORT_COLLECTION", type: "HOPP_EXPORT_COLLECTION",
exporter: "json", exporter: "json",
platform: "rest", platform: "rest",
}) })
} else {
toast.error(t(message.left))
}
isHoppMyCollectionExporterInProgress.value = false isHoppMyCollectionExporterInProgress.value = false
}, },

View File

@@ -148,7 +148,7 @@ const GqlCollectionsHoppExporter: ImporterOrExporter = {
return return
} }
toast.success(message.right) toast.success(t("state.download_started"))
platform.analytics?.logEvent({ platform.analytics?.logEvent({
type: "HOPP_EXPORT_COLLECTION", type: "HOPP_EXPORT_COLLECTION",

View File

@@ -239,11 +239,11 @@ const HoppEnvironmentsExport: ImporterOrExporter = {
) )
if (E.isLeft(message)) { if (E.isLeft(message)) {
toast.error(t(message.left)) toast.error(t("export.failed"))
return return
} }
toast.success(t(message.right)) toast.success(t("state.download_started"))
platform.analytics?.logEvent({ platform.analytics?.logEvent({
type: "HOPP_EXPORT_ENVIRONMENT", type: "HOPP_EXPORT_ENVIRONMENT",