Don't allow copying on new party page
This commit is contained in:
parent
04227e5e47
commit
23353dd65e
1 changed files with 12 additions and 8 deletions
|
|
@ -95,6 +95,9 @@ const Header = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyToClipboard() {
|
function copyToClipboard() {
|
||||||
|
const path = router.asPath.split('/')[1]
|
||||||
|
|
||||||
|
if (path === 'p') {
|
||||||
const el = document.createElement('input')
|
const el = document.createElement('input')
|
||||||
el.value = window.location.href
|
el.value = window.location.href
|
||||||
el.id = 'url-input'
|
el.id = 'url-input'
|
||||||
|
|
@ -106,6 +109,7 @@ const Header = () => {
|
||||||
|
|
||||||
setCopyToastOpen(true)
|
setCopyToastOpen(true)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function handleNewParty(event: React.MouseEvent, path: string) {
|
function handleNewParty(event: React.MouseEvent, path: string) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue