1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2025-01-03 18:35:00 +01:00

Merge pull request #35 from kremalicious/file-saver

FileSaver.js 2.0.0-rc.2
This commit is contained in:
Matthias Kretschmann 2018-09-27 20:35:00 +02:00 committed by GitHub
commit d463d97114
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@
"new": "babel-node ./scripts/new.js"
},
"dependencies": {
"file-saver": "^1.3.8",
"file-saver": "^2.0.0-rc.2",
"gatsby": "^2.0.11",
"gatsby-image": "^2.0.10",
"gatsby-plugin-favicon": "^3.1.4",

View File

@ -1,6 +1,6 @@
import React from 'react'
import { StaticQuery, graphql } from 'gatsby'
import FileSaver from 'file-saver'
import saveAs from 'file-saver'
import vCard from 'vcf'
const query = graphql`
@ -61,7 +61,7 @@ const Vcard = () => (
const downloadVcard = (vcard, meta) => {
const name = meta.addressbook.split('/').join('')
const blob = new Blob([vcard], { type: 'text/x-vcard' })
FileSaver.saveAs(blob, name)
saveAs(blob, name)
}
const constructVcard = meta => {