feat: multi-role jury fix, country flags, applicant deadline banner, timeline
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
- Fix project list returning empty for users with both SUPER_ADMIN and JURY_MEMBER roles (jury filter now skips admins) in project, assignment, and evaluation routers - Add CountryDisplay component showing flag emoji + name everywhere country is displayed (admin, observer, jury, mentor views — 17 files) - Add countdown deadline banner on applicant dashboard for INTAKE, SUBMISSION, and MENTORING rounds with live timer - Remove quick action buttons from applicant dashboard - Fix competition timeline sidebar: green dots/connectors only up to current round, yellow dot for current round, red connector into rejected round, grey after Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
30
src/components/shared/country-display.tsx
Normal file
30
src/components/shared/country-display.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
'use client'
|
||||
|
||||
import { getCountryFlag, getCountryName, normalizeCountryToCode } from '@/lib/countries'
|
||||
|
||||
/**
|
||||
* Displays a country flag emoji followed by the country name.
|
||||
* Accepts either an ISO-2 code or a full country name.
|
||||
*/
|
||||
export function CountryDisplay({
|
||||
country,
|
||||
showName = true,
|
||||
className,
|
||||
}: {
|
||||
country: string | null | undefined
|
||||
showName?: boolean
|
||||
className?: string
|
||||
}) {
|
||||
if (!country) return null
|
||||
|
||||
const code = normalizeCountryToCode(country)
|
||||
const flag = code ? getCountryFlag(code) : null
|
||||
const name = code ? getCountryName(code) : country
|
||||
|
||||
return (
|
||||
<span className={className}>
|
||||
{flag && <span className="mr-1">{flag}</span>}
|
||||
{showName && name}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user