CodeyBoi / CodeyBoi/appendix3

Display corps birthday

オープン
#391 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
5
フォーク
1
平均マージ
15分
マージ済み PR(30日)
21

説明

Add a cake emoji (🎂) at the end of a corps' name in CorpsDisplay if the current date is their corps-birthday. Meaning, the date of their first rehearsal or first gig (whichever is earliest).

This date is already calculated when building the text in the component (in "Gick med i corpset..."), so preferably this value should be reused in both places. Even MORE preferably the calculation should be moved out to its own function in the corps/stats router.

To keep the router function pure either the component or router API could take `currentDate` as an argument and use that for checking if the current date is their corps-birthday, rather than using `new Date()` directly in the code, as that would make the function non-pure.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

CorpsDisplay と corps/stats router を調査し、まず「Gick med i corpset...」テキストに使用されている既存の日付計算を確認します。その計算を再利用するか切り出し、ロジックが純粋なままになるように currentDate を考慮します。最初のリハーサルまたは最初のギグのうち最も早い日付に基づく corps の誕生日にのみ、corps 名の後に 🎂 が表示されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
full-stack
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。