From 725d88fec2bee7ae3d1bc9e211b634f9b17f1fb0 Mon Sep 17 00:00:00 2001
From: Matt
Date: Thu, 19 Feb 2026 16:55:04 +0100
Subject: [PATCH] Show full country names instead of ISO codes on projects
pages
Co-Authored-By: Claude Opus 4.6
---
src/app/(admin)/admin/projects/page.tsx | 26 +++-----------------
src/app/(admin)/admin/projects/pool/page.tsx | 8 +++++-
2 files changed, 11 insertions(+), 23 deletions(-)
diff --git a/src/app/(admin)/admin/projects/page.tsx b/src/app/(admin)/admin/projects/page.tsx
index da03b7c..a26dd10 100644
--- a/src/app/(admin)/admin/projects/page.tsx
+++ b/src/app/(admin)/admin/projects/page.tsx
@@ -907,17 +907,8 @@ export default function ProjectsPage() {
const code = normalizeCountryToCode(project.country)
const flag = code ? getCountryFlag(code) : null
const name = code ? getCountryName(code) : project.country
- return flag ? (
-
-
-
- · {flag}
-
- {name}
-
-
- ) : (
- · {project.country}
+ return (
+ · {flag && {flag}} {name}
)
})()}
@@ -1176,17 +1167,8 @@ export default function ProjectsPage() {
const code = normalizeCountryToCode(project.country)
const flag = code ? getCountryFlag(code) : null
const name = code ? getCountryName(code) : project.country
- return flag ? (
-
-
-
- · {flag}
-
- {name}
-
-
- ) : (
- · {project.country}
+ return (
+ · {flag && {flag}} {name}
)
})()}
diff --git a/src/app/(admin)/admin/projects/pool/page.tsx b/src/app/(admin)/admin/projects/pool/page.tsx
index 5f30726..3364514 100644
--- a/src/app/(admin)/admin/projects/pool/page.tsx
+++ b/src/app/(admin)/admin/projects/pool/page.tsx
@@ -28,6 +28,7 @@ import { Badge } from '@/components/ui/badge'
import { Input } from '@/components/ui/input'
import { Card, CardContent } from '@/components/ui/card'
import { Skeleton } from '@/components/ui/skeleton'
+import { getCountryName, getCountryFlag, normalizeCountryToCode } from '@/lib/countries'
import { toast } from 'sonner'
import { ArrowLeft, ChevronLeft, ChevronRight, Loader2, X, Layers, Info } from 'lucide-react'
@@ -387,7 +388,12 @@ export default function ProjectPoolPage() {
)}
- {project.country || '-'}
+ {project.country ? (() => {
+ const code = normalizeCountryToCode(project.country)
+ const flag = code ? getCountryFlag(code) : null
+ const name = code ? getCountryName(code) : project.country
+ return <>{flag && {flag} }{name}>
+ })() : '-'}
|
{project.submittedAt
|