From dacecf3c173008e0f603d9ca4b10d20bba8aa933 Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Tue, 19 Dec 2023 11:39:32 +0530 Subject: [PATCH] refactor: rely on platform implementation for opening external links --- .../src/components/collections/ImportExport.vue | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/hoppscotch-common/src/components/collections/ImportExport.vue b/packages/hoppscotch-common/src/components/collections/ImportExport.vue index d611f02b0..120dcc245 100644 --- a/packages/hoppscotch-common/src/components/collections/ImportExport.vue +++ b/packages/hoppscotch-common/src/components/collections/ImportExport.vue @@ -500,8 +500,6 @@ const HoppGistCollectionsExporter: ImporterOrExporter = { if (E.isRight(collectionJSON)) { const res = await gistExporter(collectionJSON.right, accessToken) - console.log(JSON.stringify(res, null, 2)) - if (E.isLeft(res)) { toast.error(t("export.failed")) return @@ -515,9 +513,7 @@ const HoppGistCollectionsExporter: ImporterOrExporter = { platform: "rest", }) - if (res.right) { - window.open(res.right, "_blank") - } + platform.io.openExternalLink(res.right) } isHoppGistCollectionExporterInProgress.value = false @@ -606,4 +602,3 @@ const getCollectionJSON = async () => { return E.left("INVALID_SELECTED_TEAM_OR_INVALID_COLLECTION_TYPE") } -~/helpers/import-export/export/gist