Restrict native share dialog to mobile devices, use clipboard copy on desktop
This commit is contained in:
@@ -124,8 +124,10 @@ export default function Game({ dailyPuzzle, genre = null, isSpecial = false, max
|
||||
|
||||
const text = `Hördle #${dailyPuzzle.id}\n${genreText}\n${speaker}${emojiGrid}\n\n#Hördle #Music\n\n${shareUrl}`;
|
||||
|
||||
// Try native Web Share API first (mobile-friendly)
|
||||
if (navigator.share) {
|
||||
// Try native Web Share API only on mobile devices
|
||||
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
|
||||
|
||||
if (isMobile && navigator.share) {
|
||||
try {
|
||||
await navigator.share({
|
||||
title: `Hördle #${dailyPuzzle.id}`,
|
||||
|
||||
Reference in New Issue
Block a user