Private
Public Access
1
0

fix: usr: do not hide the end-game overlay ever #8

This commit is contained in:
2026-04-21 08:48:44 +02:00
parent 20a969705d
commit 0d04ec91e7
3 changed files with 10 additions and 5 deletions

View File

@@ -23,11 +23,13 @@ const GridControl = ({ gameAssoc, onClick, resign }) => {
const [copied, setCopied] = useState(false);
const shareUrl = gameAssoc ? `${window.location.origin}/play/${gameAssoc}` : null;
const endShareUrl = gameAssoc ? `${window.location.origin}/battle/${gameAssoc}` : null;
const isAuthenticated = '1' === document.getElementById('mine-wrapper')?.dataset.isAuthenticated;
const handleShare = () => {
if (!shareUrl) return;
navigator.clipboard.writeText(shareUrl).then(() => {
const url = endRef.current ? endShareUrl : shareUrl;
if (!url) return;
navigator.clipboard.writeText(url).then(() => {
setCopied(true);
setTimeout(() => setCopied(false), 2200);
});