|
|
@ -15,9 +15,9 @@ async function tweet (encodedImage) {
|
|
|
|
const processedData = encodedImage.split(',')[1]
|
|
|
|
const processedData = encodedImage.split(',')[1]
|
|
|
|
|
|
|
|
|
|
|
|
return axios.post(`${DOMAIN}/twitter`, { data: processedData })
|
|
|
|
return axios.post(`${DOMAIN}/twitter`, { data: processedData })
|
|
|
|
.then((res) => res.data.url)
|
|
|
|
.then(res => res.data.url)
|
|
|
|
.then((url) => encodeURIComponent(`Built with @carbon ${url}`))
|
|
|
|
.then(url => encodeURIComponent(`Built with #Carbon, by @dawn_labs ${url}`))
|
|
|
|
.then((uri) => `https://twitter.com/intent/tweet?text=${uri}`)
|
|
|
|
.then(uri => `https://twitter.com/intent/tweet?text=${uri}`)
|
|
|
|
.then(openTwitterUrl)
|
|
|
|
.then(openTwitterUrl)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|