Full Next.js 15 platform with tRPC, Prisma, PostgreSQL, NextAuth. Includes production Dockerfile (multi-stage, port 7600), docker-compose with registry-based image pull, Gitea Actions CI workflow, nginx config for portal.monaco-opc.com, deployment scripts, and DEPLOYMENT.md guide. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
51 lines
1.4 KiB
TypeScript
51 lines
1.4 KiB
TypeScript
'use client'
|
|
|
|
import { trpc } from '@/lib/trpc/client'
|
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
|
|
import { GeographicDistribution } from './geographic-distribution'
|
|
import { Globe } from 'lucide-react'
|
|
import { Skeleton } from '@/components/ui/skeleton'
|
|
|
|
type GeographicSummaryCardProps = {
|
|
programId: string
|
|
}
|
|
|
|
export function GeographicSummaryCard({ programId }: GeographicSummaryCardProps) {
|
|
const { data, isLoading } = trpc.analytics.getGeographicDistribution.useQuery(
|
|
{ programId },
|
|
{ enabled: !!programId }
|
|
)
|
|
|
|
if (isLoading) {
|
|
return (
|
|
<Card>
|
|
<CardHeader>
|
|
<CardTitle className="flex items-center gap-2">
|
|
<Globe className="h-5 w-5" />
|
|
Project Origins
|
|
</CardTitle>
|
|
<CardDescription>Geographic distribution of projects</CardDescription>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<Skeleton className="h-[250px] w-full rounded-md" />
|
|
</CardContent>
|
|
</Card>
|
|
)
|
|
}
|
|
|
|
return (
|
|
<Card>
|
|
<CardHeader>
|
|
<CardTitle className="flex items-center gap-2">
|
|
<Globe className="h-5 w-5" />
|
|
Project Origins
|
|
</CardTitle>
|
|
<CardDescription>Geographic distribution of projects</CardDescription>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<GeographicDistribution data={data || []} compact />
|
|
</CardContent>
|
|
</Card>
|
|
)
|
|
}
|