Merge pull request #188 from jedmund/fix-182

Don't allow copying on new party page
This commit is contained in:
Justin Edmund 2023-01-28 21:15:42 -08:00 committed by GitHub
commit a14d7ea9ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,6 +95,9 @@ const Header = () => {
}
function copyToClipboard() {
const path = router.asPath.split('/')[1]
if (path === 'p') {
const el = document.createElement('input')
el.value = window.location.href
el.id = 'url-input'
@ -106,6 +109,7 @@ const Header = () => {
setCopyToastOpen(true)
}
}
function handleNewParty(event: React.MouseEvent, path: string) {
event.preventDefault()