Display corps birthday
- Lingua principale
- TypeScript
- Stelle
- 5
- Fork
- 1
- Merge medio
- 15m
- PR unite (30g)
- 21
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Esamina CorpsDisplay e il router corps/stats, iniziando dal calcolo della data esistente usato per il testo “Gick med i corpset...”. Riutilizza o estrai quel calcolo e tieni conto di currentDate affinché la logica rimanga pura. Il lavoro è completo quando un 🎂 appare dopo il nome del corps solo nel giorno del compleanno del corps, in base alla data più antica della prima prova o del primo concerto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- full-stack
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 55/100