Show full country names instead of ISO codes on projects pages
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m38s
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m38s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -907,17 +907,8 @@ export default function ProjectsPage() {
|
|||||||
const code = normalizeCountryToCode(project.country)
|
const code = normalizeCountryToCode(project.country)
|
||||||
const flag = code ? getCountryFlag(code) : null
|
const flag = code ? getCountryFlag(code) : null
|
||||||
const name = code ? getCountryName(code) : project.country
|
const name = code ? getCountryName(code) : project.country
|
||||||
return flag ? (
|
return (
|
||||||
<TooltipProvider delayDuration={200}>
|
<span className="text-xs text-muted-foreground/70"> · {flag && <span className="text-sm">{flag}</span>} {name}</span>
|
||||||
<Tooltip>
|
|
||||||
<TooltipTrigger asChild>
|
|
||||||
<span className="text-xs cursor-default"> · <span className="text-sm">{flag}</span></span>
|
|
||||||
</TooltipTrigger>
|
|
||||||
<TooltipContent side="top"><p>{name}</p></TooltipContent>
|
|
||||||
</Tooltip>
|
|
||||||
</TooltipProvider>
|
|
||||||
) : (
|
|
||||||
<span className="text-xs text-muted-foreground/70"> · {project.country}</span>
|
|
||||||
)
|
)
|
||||||
})()}
|
})()}
|
||||||
</p>
|
</p>
|
||||||
@@ -1176,17 +1167,8 @@ export default function ProjectsPage() {
|
|||||||
const code = normalizeCountryToCode(project.country)
|
const code = normalizeCountryToCode(project.country)
|
||||||
const flag = code ? getCountryFlag(code) : null
|
const flag = code ? getCountryFlag(code) : null
|
||||||
const name = code ? getCountryName(code) : project.country
|
const name = code ? getCountryName(code) : project.country
|
||||||
return flag ? (
|
return (
|
||||||
<TooltipProvider delayDuration={200}>
|
<span className="text-xs text-muted-foreground/70"> · {flag && <span className="text-sm">{flag}</span>} {name}</span>
|
||||||
<Tooltip>
|
|
||||||
<TooltipTrigger asChild>
|
|
||||||
<span className="text-xs cursor-default"> · <span className="text-sm">{flag}</span></span>
|
|
||||||
</TooltipTrigger>
|
|
||||||
<TooltipContent side="top"><p>{name}</p></TooltipContent>
|
|
||||||
</Tooltip>
|
|
||||||
</TooltipProvider>
|
|
||||||
) : (
|
|
||||||
<span className="text-xs text-muted-foreground/70"> · {project.country}</span>
|
|
||||||
)
|
)
|
||||||
})()}
|
})()}
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import { Badge } from '@/components/ui/badge'
|
|||||||
import { Input } from '@/components/ui/input'
|
import { Input } from '@/components/ui/input'
|
||||||
import { Card, CardContent } from '@/components/ui/card'
|
import { Card, CardContent } from '@/components/ui/card'
|
||||||
import { Skeleton } from '@/components/ui/skeleton'
|
import { Skeleton } from '@/components/ui/skeleton'
|
||||||
|
import { getCountryName, getCountryFlag, normalizeCountryToCode } from '@/lib/countries'
|
||||||
import { toast } from 'sonner'
|
import { toast } from 'sonner'
|
||||||
import { ArrowLeft, ChevronLeft, ChevronRight, Loader2, X, Layers, Info } from 'lucide-react'
|
import { ArrowLeft, ChevronLeft, ChevronRight, Loader2, X, Layers, Info } from 'lucide-react'
|
||||||
|
|
||||||
@@ -387,7 +388,12 @@ export default function ProjectPoolPage() {
|
|||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
<td className="p-3 text-sm text-muted-foreground">
|
<td className="p-3 text-sm text-muted-foreground">
|
||||||
{project.country || '-'}
|
{project.country ? (() => {
|
||||||
|
const code = normalizeCountryToCode(project.country)
|
||||||
|
const flag = code ? getCountryFlag(code) : null
|
||||||
|
const name = code ? getCountryName(code) : project.country
|
||||||
|
return <>{flag && <span>{flag} </span>}{name}</>
|
||||||
|
})() : '-'}
|
||||||
</td>
|
</td>
|
||||||
<td className="p-3 text-sm text-muted-foreground">
|
<td className="p-3 text-sm text-muted-foreground">
|
||||||
{project.submittedAt
|
{project.submittedAt
|
||||||
|
|||||||
Reference in New Issue
Block a user