Skip to content

Export getCurrentDay and improve current day calculation for championship header#89

Open
dai wants to merge 1 commit into
mainfrom
codex/fix-changes-not-reflecting-after-merging-pr83-5qqzkt
Open

Export getCurrentDay and improve current day calculation for championship header#89
dai wants to merge 1 commit into
mainfrom
codex/fix-changes-not-reflecting-after-merging-pr83-5qqzkt

Conversation

@dai

@dai dai commented May 24, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Ensure the championship header (優勝争い) reflects the correct day when day 14 has started by deriving the current day from multiple data sources instead of a single published flag.

Description

  • Add and export getCurrentDay in app/page.tsx which computes the current basho day using resultDays with status === 'published', a resultUpdatedAt reference date to consider isoDate-bounded result days, and today.makuuchi.day, then returns the maximum of those values.
  • Update the Home component to use the new getCurrentDay result for currentDay and the showChampionshipRace flag.
  • Update app/page.test.tsx to import getCurrentDay and add a test shows championship header as day 14 when day 14 has started that asserts the championship headings use the computed day.

Testing

  • Ran unit tests including app/page.test.tsx which exercised the new getCurrentDay behavior and the new championship header test, and they passed.

Codex Task

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 24, 2026

Copy link
Copy Markdown

Deploying o-sumo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6ab1f3f
Status: ✅  Deploy successful!
Preview URL: https://3697fc8d.o-sumo.pages.dev
Branch Preview URL: https://codex-fix-changes-not-reflec-v081.o-sumo.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant