fix: use location origin

This commit is contained in:
Judicael 2022-09-01 12:45:17 +03:00
parent 1be09d2204
commit f55a73f827

View file

@ -36,7 +36,7 @@ const ShareMenu = () => {
},
}
const crushed = JSONCrush.crush(JSON.stringify(state))
const link = `${window.location.href}/?d=${encodeURIComponent(crushed)}`
const link = `${window.location.origin}/?d=${encodeURIComponent(crushed)}`
navigator.clipboard.writeText(link)
} catch (err) {
console.error(err)