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,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;
|
||||
|
||||
Reference in New Issue
Block a user