aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/client/pages/DeckDetailPage.tsx
diff options
context:
space:
mode:
authornsfisis <54318333+nsfisis@users.noreply.github.com>2026-02-02 22:42:51 +0900
committerGitHub <noreply@github.com>2026-02-02 22:42:51 +0900
commitfc208d960e137dd36590908145a13d8501144b7a (patch)
tree3f302c9c531c7ba25e2c5ad74c44b086df03a0d7 /src/client/pages/DeckDetailPage.tsx
parentc20922a1aa339e34b4bed3747222f4b9d9941cd6 (diff)
parentd4489f24a05911d1395e8473fe86c3442d9397ee (diff)
downloadkioku-fc208d960e137dd36590908145a13d8501144b7a.tar.gz
kioku-fc208d960e137dd36590908145a13d8501144b7a.tar.zst
kioku-fc208d960e137dd36590908145a13d8501144b7a.zip
Merge pull request #11 from nsfisis/claude/investigate-learning-schedule-plOdQ
Implement study day boundary at 3:00 AM for due card logic
Diffstat (limited to 'src/client/pages/DeckDetailPage.tsx')
-rw-r--r--src/client/pages/DeckDetailPage.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/pages/DeckDetailPage.tsx b/src/client/pages/DeckDetailPage.tsx
index be4dc90..97f8378 100644
--- a/src/client/pages/DeckDetailPage.tsx
+++ b/src/client/pages/DeckDetailPage.tsx
@@ -7,6 +7,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useAtomValue } from "jotai";
import { Suspense } from "react";
import { Link, useParams } from "wouter";
+import { getEndOfStudyDayBoundary } from "../../shared/date";
import { cardsByDeckAtomFamily, deckByIdAtomFamily } from "../atoms";
import { ErrorBoundary } from "../components/ErrorBoundary";
import { LoadingSpinner } from "../components/LoadingSpinner";
@@ -27,9 +28,9 @@ function DeckHeader({ deckId }: { deckId: string }) {
function DeckStats({ deckId }: { deckId: string }) {
const { data: cards } = useAtomValue(cardsByDeckAtomFamily(deckId));
- // Count cards due today
- const now = new Date();
- const dueCards = cards.filter((card) => new Date(card.due) <= now);
+ // Count cards due today (study day boundary is 3:00 AM)
+ const boundary = getEndOfStudyDayBoundary();
+ const dueCards = cards.filter((card) => new Date(card.due) < boundary);
return (
<div className="bg-white rounded-xl border border-border/50 p-6 mb-6">