refactor: rely on platform implementation for opening external links
This commit is contained in:
@@ -500,8 +500,6 @@ const HoppGistCollectionsExporter: ImporterOrExporter = {
|
|||||||
if (E.isRight(collectionJSON)) {
|
if (E.isRight(collectionJSON)) {
|
||||||
const res = await gistExporter(collectionJSON.right, accessToken)
|
const res = await gistExporter(collectionJSON.right, accessToken)
|
||||||
|
|
||||||
console.log(JSON.stringify(res, null, 2))
|
|
||||||
|
|
||||||
if (E.isLeft(res)) {
|
if (E.isLeft(res)) {
|
||||||
toast.error(t("export.failed"))
|
toast.error(t("export.failed"))
|
||||||
return
|
return
|
||||||
@@ -515,9 +513,7 @@ const HoppGistCollectionsExporter: ImporterOrExporter = {
|
|||||||
platform: "rest",
|
platform: "rest",
|
||||||
})
|
})
|
||||||
|
|
||||||
if (res.right) {
|
platform.io.openExternalLink(res.right)
|
||||||
window.open(res.right, "_blank")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isHoppGistCollectionExporterInProgress.value = false
|
isHoppGistCollectionExporterInProgress.value = false
|
||||||
@@ -606,4 +602,3 @@ const getCollectionJSON = async () => {
|
|||||||
return E.left("INVALID_SELECTED_TEAM_OR_INVALID_COLLECTION_TYPE")
|
return E.left("INVALID_SELECTED_TEAM_OR_INVALID_COLLECTION_TYPE")
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
~/helpers/import-export/export/gist
|
|
||||||
|
|||||||
Reference in New Issue
Block a user