(badge: Badge)
| 399 | } |
| 400 | |
| 401 | export function addBadge(badge: Badge): void { |
| 402 | const snapshot = getSnapshot(); |
| 403 | if (!snapshot) return; |
| 404 | |
| 405 | snapshot.inventory ??= { |
| 406 | badges: [], |
| 407 | }; |
| 408 | snapshot.inventory.badges.push(badge); |
| 409 | setSnapshot(snapshot); |
| 410 | } |
| 411 | |
| 412 | export async function getTestActivityCalendar( |
| 413 | yearString: string, |
no test coverage detected