fix(logic): use sequential puzzle number instead of database ID
This commit is contained in:
@@ -10,6 +10,7 @@ import { sendGotifyNotification } from '../app/actions';
|
||||
interface GameProps {
|
||||
dailyPuzzle: {
|
||||
id: number;
|
||||
puzzleNumber: number;
|
||||
audioUrl: string;
|
||||
songId: number;
|
||||
title: string;
|
||||
@@ -141,7 +142,7 @@ 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}`;
|
||||
const text = `Hördle #${dailyPuzzle.puzzleNumber}\n${genreText}\n${speaker}${emojiGrid}\n\n#Hördle #Music\n\n${shareUrl}`;
|
||||
|
||||
// Try native Web Share API only on mobile devices
|
||||
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
|
||||
@@ -149,7 +150,7 @@ export default function Game({ dailyPuzzle, genre = null, isSpecial = false, max
|
||||
if (isMobile && navigator.share) {
|
||||
try {
|
||||
await navigator.share({
|
||||
title: `Hördle #${dailyPuzzle.id}`,
|
||||
title: `Hördle #${dailyPuzzle.puzzleNumber}`,
|
||||
text: text,
|
||||
});
|
||||
setShareText('✓ Shared!');
|
||||
@@ -178,7 +179,7 @@ export default function Game({ dailyPuzzle, genre = null, isSpecial = false, max
|
||||
return (
|
||||
<div className="container">
|
||||
<header className="header">
|
||||
<h1 className="title">Hördle #{dailyPuzzle.id}{genre ? ` / ${genre}` : ''}</h1>
|
||||
<h1 className="title">Hördle #{dailyPuzzle.puzzleNumber}{genre ? ` / ${genre}` : ''}</h1>
|
||||
<div style={{ fontSize: '0.9rem', color: '#666', marginTop: '-0.5rem', marginBottom: '1rem' }}>
|
||||
Next puzzle in: {timeUntilNext}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user