Display corps birthday
- Langage dominant
- TypeScript
- Étoiles
- 5
- Forks
- 1
- Merge moyen
- 15 min
- PR mergées (30 j)
- 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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Inspectez CorpsDisplay et le routeur corps/stats, en commençant par le calcul de date existant utilisé pour le texte « Gick med i corpset... ». Réutilisez ou extrayez ce calcul et tenez compte de currentDate afin que la logique reste pure. La tâche est terminée lorsqu’un 🎂 apparaît après le nom du corps uniquement le jour anniversaire du corps, en se basant sur la date la plus ancienne d’une première répétition ou d’un premier concert.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- typescript
- Domaine
- full-stack
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 55/100