mirror of
https://github.com/pupperpowell/bibdle.git
synced 2026-04-05 17:33:31 -04:00
removed unneccesary code i think
This commit is contained in:
@@ -114,8 +114,6 @@ export function createGamePersistence(
|
||||
guesses = guessIds
|
||||
.map((bookId) => evaluateGuess(bookId, correctBookId))
|
||||
.filter((g): g is Guess => g !== null);
|
||||
// Persist to localStorage so subsequent loads on this device skip the server check
|
||||
localStorage.setItem(`bibdle-guesses-${date}`, JSON.stringify(guessIds));
|
||||
}
|
||||
|
||||
function onChapterGuessCompleted() {
|
||||
|
||||
@@ -114,31 +114,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// If server date doesn't match client's local date, fetch timezone-correct verse
|
||||
$effect(() => {
|
||||
if (!browser) return;
|
||||
|
||||
const localDate = new Date().toLocaleDateString("en-CA");
|
||||
if (dailyVerse.date === localDate) return;
|
||||
|
||||
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
||||
fetch("/api/daily-verse", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ date: localDate, timezone }),
|
||||
})
|
||||
.then((res) => res.json())
|
||||
.then((result) => {
|
||||
dailyVerse = result.dailyVerse;
|
||||
correctBookId = result.correctBookId;
|
||||
correctBook = result.correctBook;
|
||||
})
|
||||
.catch((err) =>
|
||||
console.error("Failed to fetch timezone-correct verse:", err),
|
||||
);
|
||||
});
|
||||
|
||||
// Reload when the user returns to a stale tab on a new calendar day
|
||||
$effect(() => {
|
||||
if (!browser) return;
|
||||
|
||||
BIN
static/favicon.ico
Normal file
BIN
static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.9 KiB |
Reference in New Issue
Block a user