CodeyBoi / CodeyBoi/appendix3

Display corps birthday

Open
#391 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5
Forks
1
Avg merge
15m
Merged PRs (30d)
21

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.