feat(frontend): FoR Status(ランクシステム)のロジックと残高カードのバッジ表示#156
Open
yu23ki14 wants to merge 1 commit into
Open
Conversation
- 決済(送信のみ)履歴と現在時刻から現在ティアを再構成する純粋関数を実装 - 昇格/減衰は1段階ずつ、Tier 6 は「直近1ヶ月 週3回以上を継続」で判定 - ティアごとの減衰アラート文言(確定)に残日数を埋め込んで返す - useForStatus フックで transferViaRouters を from===me で抽出し算出 - home.tsx の残高カードに算出ティアのバッジを表示 - バッジ画像は rankbadge_<tier>.png(プレースホルダ、同名で差し替え可) - vitest を導入しロジックのユニットテストを追加 Closes #155 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
関連 Issue
Closes #155
変更内容
from === me)履歴と現在時刻から現在ティアを都度再構成する純粋関数computeForStatusを実装(app/lib/for-status.ts)alertMessage・daysUntilDecay・nextDecayAtMs)useForStatusフックでtransferViaRoutersを送信のみ抽出してティアを算出(app/hooks/useForStatus.ts)home.tsxの残高カードに算出ティアのバッジを表示rankbadge_<tier>.png(1〜6、現状プレースホルダ。実画像が来たら同名で差し替え)動作確認
pnpm test、11件パス)tsc --noEmit、exit 0)スクリーンショット(該当する場合)
バッジ画像は現状プレースホルダ(ティア別の色違い)です。実画像は別途差し込み予定。
その他
別途対応(このPRのロジックはブロックしません):
alertMessage/daysUntilDecay/nextDecayAtMsを返せる状態。rankbadge_<tier>.pngを同名で差し替えるだけで反映。レビュー時にご判断いただきたい点: