Fix first-login error, awards performance, filter animation, cache invalidation, and query fixes

- Guard onboarding tRPC queries with session hydration check (fixes UNAUTHORIZED on first login)
- Defer expensive queries on awards page until UI elements are opened (dialog/tab)
- Fix perPage: 500 exceeding backend Zod max of 100 on awards eligibility query
- Add smooth open/close animation to project filters collapsible bar
- Fix seeded user status from ACTIVE to INVITED in seed-candidatures.ts
- Add router.refresh() cache invalidation across ~22 admin forms
- Fix geographic analytics query to use programId instead of round.programId
- Fix dashboard queries to scope by programId correctly
- Fix project.listPool and round queries for projects outside round context
- Add rounds page useEffect for state sync after mutations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-10 21:21:54 +01:00
parent 573785e440
commit 5cae78fe0c
26 changed files with 830 additions and 341 deletions

View File

@@ -216,6 +216,18 @@ export function getCountryName(code: string): string {
return COUNTRIES[code]?.name || code
}
/**
* Convert ISO 3166-1 alpha-2 code to flag emoji.
* Uses regional indicator symbols (Unicode).
*/
export function getCountryFlag(code: string): string {
if (!code || code.length !== 2) return ''
const upper = code.toUpperCase()
return String.fromCodePoint(
...Array.from(upper).map((c) => 0x1f1e6 + c.charCodeAt(0) - 65)
)
}
export function getCountryCoordinates(code: string): [number, number] | null {
const country = COUNTRIES[code]
if (!country) return null