Add member accounts, follow-based leaderboard, and dedicated Postgres
Members register via email+password (scrypt) or Google OAuth — same signed-cookie + scrypt pattern as LokiLab (lib/auth.ts, member-password.ts, member-auth.ts, google-oauth.ts), own AUTH_SECRET and own OAuth client, own dedicated Postgres database (lokiloto-db on Coolify), fully isolated from LokiLab's own DB and auth. Leaderboard tracks who follows Loki's picks most accurately — members star a pick from the results panel (FollowButton), resolution reuses LokiLab's own lastDraw.won, no money or pooled play involved anywhere. Leaderboard page renders a horizontal bar chart (recharts) plus a ranked list. Profile page: public nickname (required to appear on the leaderboard), list of followed picks. Header now carries nav + a user menu (avatar dropdown when signed in, "Connexion" button otherwise). Dockerfile runs prisma migrate deploy at container start via docker-entrypoint.sh, same pattern as LokiLab. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
fc69d4a668
commit
c3a0a7b765
@@ -0,0 +1,19 @@
|
||||
"use server"
|
||||
|
||||
import { revalidatePath } from "next/cache"
|
||||
import { getCurrentMember } from "@/lib/member-auth"
|
||||
import { followPick, unfollowPick } from "@/lib/follows"
|
||||
|
||||
export async function toggleFollowAction(lotteryId: string, country: string, targetDrawDate: string, isFollowing: boolean) {
|
||||
const member = await getCurrentMember()
|
||||
if (!member) return { ok: false as const, needsAuth: true as const }
|
||||
|
||||
if (isFollowing) {
|
||||
await unfollowPick(member.id, lotteryId, targetDrawDate)
|
||||
} else {
|
||||
await followPick(member.id, lotteryId, country, targetDrawDate)
|
||||
}
|
||||
revalidatePath("/")
|
||||
revalidatePath("/profil")
|
||||
return { ok: true as const, needsAuth: false as const }
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
import { cookies } from 'next/headers'
|
||||
import { exchangeGoogleCode } from '@/lib/google-oauth'
|
||||
import { createMemberSession } from '@/lib/member-auth'
|
||||
import { prisma } from '@/lib/db'
|
||||
|
||||
const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || 'https://lotoloki.top'
|
||||
|
||||
function safeNext(raw: string): string {
|
||||
return raw.startsWith('/') && !raw.startsWith('//') ? raw : '/'
|
||||
}
|
||||
|
||||
export async function GET(req: Request) {
|
||||
const url = new URL(req.url)
|
||||
const origin = SITE_URL
|
||||
const code = url.searchParams.get('code')
|
||||
const state = url.searchParams.get('state')
|
||||
|
||||
const jar = await cookies()
|
||||
const savedState = jar.get('g_state')?.value
|
||||
if (!code || !state || state !== savedState) {
|
||||
return NextResponse.redirect(`${origin}/connexion?error=oauth_state`)
|
||||
}
|
||||
const next = safeNext(decodeURIComponent(state.split('.')[1] ?? '/'))
|
||||
|
||||
const profile = await exchangeGoogleCode(code)
|
||||
if (!profile?.email) {
|
||||
return NextResponse.redirect(`${origin}/connexion?error=oauth_failed`)
|
||||
}
|
||||
|
||||
const email = profile.email.toLowerCase()
|
||||
const user = await prisma.user.upsert({
|
||||
where: { googleSub: profile.sub },
|
||||
update: { email, name: profile.name || email.split('@')[0], avatarUrl: profile.picture ?? null },
|
||||
create: { email, name: profile.name || email.split('@')[0], avatarUrl: profile.picture ?? null, googleSub: profile.sub },
|
||||
})
|
||||
|
||||
await createMemberSession(user.id)
|
||||
const res = NextResponse.redirect(`${origin}${next}`)
|
||||
res.cookies.delete('g_state')
|
||||
return res
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
import { getGoogleAuthUrl, googleEnabled } from '@/lib/google-oauth'
|
||||
|
||||
function safeNext(raw: string | null): string {
|
||||
return raw && raw.startsWith('/') && !raw.startsWith('//') ? raw : '/'
|
||||
}
|
||||
|
||||
const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || 'https://lotoloki.top'
|
||||
|
||||
export async function GET(req: Request) {
|
||||
const url = new URL(req.url)
|
||||
if (!googleEnabled) {
|
||||
return NextResponse.redirect(`${SITE_URL}/connexion?error=google_not_configured`)
|
||||
}
|
||||
const next = safeNext(url.searchParams.get('next'))
|
||||
const state = `${crypto.randomUUID()}.${encodeURIComponent(next)}`
|
||||
const res = NextResponse.redirect(getGoogleAuthUrl(state))
|
||||
res.cookies.set('g_state', state, {
|
||||
httpOnly: true,
|
||||
sameSite: 'lax',
|
||||
secure: process.env.NODE_ENV === 'production',
|
||||
maxAge: 600,
|
||||
path: '/',
|
||||
})
|
||||
return res
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
import { destroyMemberSession } from '@/lib/member-auth'
|
||||
|
||||
const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || 'https://lotoloki.top'
|
||||
|
||||
export async function POST() {
|
||||
await destroyMemberSession()
|
||||
return NextResponse.redirect(`${SITE_URL}/`, { status: 303 })
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
import type { Metadata } from "next"
|
||||
import { leaderboard } from "@/lib/follows"
|
||||
import { AppHeader } from "@/components/app-header"
|
||||
import { LeaderboardChart } from "@/components/leaderboard-chart"
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
|
||||
import { Trophy } from "lucide-react"
|
||||
|
||||
export const metadata: Metadata = { title: "Classement — LokiLoto" }
|
||||
export const instant = false
|
||||
|
||||
export default async function LeaderboardPage() {
|
||||
const standings = await leaderboard(20)
|
||||
|
||||
return (
|
||||
<main className="flex flex-1 flex-col">
|
||||
<AppHeader />
|
||||
<div className="mx-auto w-full max-w-3xl flex-1 px-4 py-6 sm:px-6">
|
||||
<h1 className="text-2xl font-bold tracking-tight">Classement</h1>
|
||||
<p className="mt-1 text-sm text-muted-foreground">
|
||||
Les membres qui suivent le plus fidèlement les choix de Loki — aucun argent réel en jeu,
|
||||
seulement le taux de réussite des pronostics suivis.
|
||||
</p>
|
||||
|
||||
{standings.length === 0 ? (
|
||||
<p className="mt-8 text-sm text-muted-foreground">
|
||||
Personne n'a encore suivi de pronostic. Le classement apparaîtra dès les premiers
|
||||
tirages résolus.
|
||||
</p>
|
||||
) : (
|
||||
<>
|
||||
<div className="mt-6 rounded-md border border-border/60 bg-panel p-4">
|
||||
<LeaderboardChart standings={standings} />
|
||||
</div>
|
||||
|
||||
<div className="mt-4 divide-y divide-border rounded-md border border-border/60 bg-panel">
|
||||
{standings.map((s, i) => (
|
||||
<div key={s.userId} className="flex items-center gap-3 px-4 py-2.5 text-sm">
|
||||
<span className="w-5 shrink-0 text-center text-xs text-muted-foreground tabular-nums">
|
||||
{i + 1}
|
||||
</span>
|
||||
<Avatar className="h-7 w-7 shrink-0">
|
||||
<AvatarImage src={s.avatarUrl ?? undefined} alt="" />
|
||||
<AvatarFallback>{s.displayName.charAt(0).toUpperCase()}</AvatarFallback>
|
||||
</Avatar>
|
||||
<span className="flex-1 font-medium">{s.displayName}</span>
|
||||
{i === 0 && <Trophy className="h-4 w-4 text-accent" />}
|
||||
<span className="text-xs text-muted-foreground">{s.followed} suivis</span>
|
||||
<span className="w-12 text-right font-semibold tabular-nums">
|
||||
{(s.winRate * 100).toFixed(0)}%
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
'use server'
|
||||
|
||||
import { headers } from 'next/headers'
|
||||
import { redirect } from 'next/navigation'
|
||||
import { z } from 'zod'
|
||||
import { prisma } from '@/lib/db'
|
||||
import { createMemberSession } from '@/lib/member-auth'
|
||||
import { hashPassword, verifyPassword, loginAllowed, recordLoginFailure, clearLoginFailures } from '@/lib/member-password'
|
||||
|
||||
export interface MemberAuthState {
|
||||
ok: boolean
|
||||
message: string
|
||||
}
|
||||
|
||||
const signupSchema = z.object({
|
||||
name: z.string().trim().min(1).max(80),
|
||||
email: z.string().trim().toLowerCase().email(),
|
||||
password: z.string().min(8).max(200),
|
||||
next: z.string().startsWith('/').refine((s) => !s.startsWith('//'), { message: 'invalid next' }),
|
||||
})
|
||||
|
||||
const loginSchema = z.object({
|
||||
email: z.string().trim().toLowerCase().email(),
|
||||
password: z.string().min(1).max(200),
|
||||
next: z.string().startsWith('/').refine((s) => !s.startsWith('//'), { message: 'invalid next' }),
|
||||
})
|
||||
|
||||
async function clientIp(): Promise<string> {
|
||||
const h = await headers()
|
||||
return (h.get('x-forwarded-for')?.split(',')[0] ?? h.get('x-real-ip') ?? 'unknown').trim()
|
||||
}
|
||||
|
||||
export async function signupWithPassword(_prev: MemberAuthState, formData: FormData): Promise<MemberAuthState> {
|
||||
const ip = await clientIp()
|
||||
if (!loginAllowed(ip)) return { ok: false, message: 'Trop de tentatives. Réessayez dans 15 minutes.' }
|
||||
|
||||
const parsed = signupSchema.safeParse({
|
||||
name: formData.get('name'),
|
||||
email: formData.get('email'),
|
||||
password: formData.get('password'),
|
||||
next: formData.get('next') || '/profil',
|
||||
})
|
||||
if (!parsed.success) {
|
||||
recordLoginFailure(ip)
|
||||
return { ok: false, message: 'Nom, courriel valide et mot de passe (8 caractères min.) requis.' }
|
||||
}
|
||||
|
||||
const existing = await prisma.user.findUnique({ where: { email: parsed.data.email } })
|
||||
if (existing) {
|
||||
return { ok: false, message: 'Un compte existe déjà avec ce courriel. Connectez-vous plutôt.' }
|
||||
}
|
||||
|
||||
const user = await prisma.user.create({
|
||||
data: {
|
||||
email: parsed.data.email,
|
||||
name: parsed.data.name,
|
||||
passwordHash: hashPassword(parsed.data.password),
|
||||
},
|
||||
})
|
||||
|
||||
clearLoginFailures(ip)
|
||||
await createMemberSession(user.id)
|
||||
redirect(parsed.data.next)
|
||||
}
|
||||
|
||||
export async function loginWithPassword(_prev: MemberAuthState, formData: FormData): Promise<MemberAuthState> {
|
||||
const ip = await clientIp()
|
||||
if (!loginAllowed(ip)) return { ok: false, message: 'Trop de tentatives. Réessayez dans 15 minutes.' }
|
||||
|
||||
const parsed = loginSchema.safeParse({
|
||||
email: formData.get('email'),
|
||||
password: formData.get('password'),
|
||||
next: formData.get('next') || '/profil',
|
||||
})
|
||||
if (!parsed.success) {
|
||||
recordLoginFailure(ip)
|
||||
return { ok: false, message: 'Courriel ou mot de passe incorrect.' }
|
||||
}
|
||||
|
||||
const user = await prisma.user.findUnique({ where: { email: parsed.data.email } })
|
||||
if (!user?.passwordHash || !verifyPassword(parsed.data.password, user.passwordHash)) {
|
||||
recordLoginFailure(ip)
|
||||
return { ok: false, message: 'Courriel ou mot de passe incorrect.' }
|
||||
}
|
||||
|
||||
clearLoginFailures(ip)
|
||||
await createMemberSession(user.id)
|
||||
redirect(parsed.data.next)
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
import type { Metadata } from "next"
|
||||
import Link from "next/link"
|
||||
import { redirect } from "next/navigation"
|
||||
import { getCurrentMember } from "@/lib/member-auth"
|
||||
import { MemberAuthForm } from "@/components/member-auth-form"
|
||||
import { LokiMark } from "@/components/loki-mark"
|
||||
|
||||
export const metadata: Metadata = { title: "Connexion — LokiLoto" }
|
||||
export const instant = false
|
||||
|
||||
const ERROR_FR: Record<string, string> = {
|
||||
oauth_state: "La connexion a expiré ou a été interrompue. Réessayez.",
|
||||
oauth_failed: "La connexion avec Google a échoué. Réessayez.",
|
||||
google_not_configured: "La connexion Google n'est pas encore activée sur ce site.",
|
||||
}
|
||||
|
||||
export default async function LoginPage({
|
||||
searchParams,
|
||||
}: {
|
||||
searchParams: Promise<Record<string, string | string[] | undefined>>
|
||||
}) {
|
||||
const member = await getCurrentMember()
|
||||
if (member) redirect("/profil")
|
||||
|
||||
const sp = await searchParams
|
||||
const errorKey = typeof sp.error === "string" ? sp.error : null
|
||||
const error = errorKey ? (ERROR_FR[errorKey] ?? "Une erreur est survenue. Réessayez.") : null
|
||||
const next = typeof sp.next === "string" && sp.next.startsWith("/") ? sp.next : "/profil"
|
||||
|
||||
return (
|
||||
<main className="flex flex-1 items-center justify-center px-4 py-12">
|
||||
<div className="w-full max-w-sm">
|
||||
<Link href="/" className="mb-8 inline-flex items-center gap-2">
|
||||
<LokiMark className="h-8 w-8 text-accent" />
|
||||
<span className="text-lg font-bold tracking-tight">LokiLoto</span>
|
||||
</Link>
|
||||
|
||||
<h1 className="text-xl font-bold tracking-tight">Connexion</h1>
|
||||
<p className="mt-1 text-sm text-muted-foreground">
|
||||
Suivez les choix de Loki, apparaissez au classement, gardez votre pays favori.
|
||||
</p>
|
||||
|
||||
{error && <p className="mt-4 text-xs text-destructive">{error}</p>}
|
||||
|
||||
<div className="mt-6">
|
||||
<MemberAuthForm next={next} />
|
||||
</div>
|
||||
|
||||
<div className="my-5 flex items-center gap-3 text-[11px] text-muted-foreground">
|
||||
<span className="h-px flex-1 bg-border" />
|
||||
ou
|
||||
<span className="h-px flex-1 bg-border" />
|
||||
</div>
|
||||
|
||||
<a
|
||||
href={`/api/auth/google?next=${encodeURIComponent(next)}`}
|
||||
className="flex h-9 w-full items-center justify-center gap-3 rounded-md border border-border bg-panel text-sm font-medium transition-colors hover:bg-panel-hover"
|
||||
>
|
||||
<svg viewBox="0 0 24 24" className="h-4 w-4 shrink-0" aria-hidden="true">
|
||||
<path
|
||||
fill="#4285F4"
|
||||
d="M23.52 12.27c0-.85-.07-1.47-.23-2.12H12v3.85h6.6c-.13 1.1-.86 2.76-2.47 3.87l-.02.15 3.59 2.78.25.02c2.28-2.1 3.57-5.2 3.57-8.55"
|
||||
/>
|
||||
<path
|
||||
fill="#34A853"
|
||||
d="M12 24c3.24 0 5.95-1.07 7.93-2.91l-3.78-2.93c-1.02.7-2.4 1.19-4.15 1.19-3.18 0-5.88-2.1-6.84-5l-.14.01-3.73 2.89-.05.13C3.21 21.3 7.26 24 12 24"
|
||||
/>
|
||||
<path
|
||||
fill="#FBBC05"
|
||||
d="M5.16 14.35A7.3 7.3 0 0 1 4.75 12c0-.81.14-1.6.4-2.35l-.01-.16-3.78-2.94-.12.06A11.97 11.97 0 0 0 0 12c0 1.93.46 3.76 1.24 5.39l3.92-3.04"
|
||||
/>
|
||||
<path
|
||||
fill="#EA4335"
|
||||
d="M12 4.75c2.25 0 3.77.97 4.64 1.78l3.39-3.31C17.94 1.19 15.24 0 12 0 7.26 0 3.21 2.7 1.24 6.61l3.91 3.04c.97-2.9 3.67-5 6.85-5"
|
||||
/>
|
||||
</svg>
|
||||
Continuer avec Google
|
||||
</a>
|
||||
|
||||
<p className="mt-6 text-[11px] leading-relaxed text-muted-foreground">
|
||||
Un compte LokiLoto sert à suivre vos pronostics et apparaître au classement. Aucun billet
|
||||
n'est vendu, aucun argent ne transite par ce site.
|
||||
</p>
|
||||
<Link href="/" className="mt-6 inline-block text-xs text-muted-foreground hover:text-foreground">
|
||||
← Retour au site
|
||||
</Link>
|
||||
</div>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
+13
-14
@@ -1,9 +1,11 @@
|
||||
import { Suspense } from "react"
|
||||
import { COUNTRIES, countryTheme } from "@/lib/countries"
|
||||
import { getArmyFeed } from "@/lib/lokilab-feed"
|
||||
import { getCurrentMember } from "@/lib/member-auth"
|
||||
import { listFollowedPicks } from "@/lib/follows"
|
||||
import { CountryNav, CountryNavMobile } from "@/components/country-nav"
|
||||
import { LotteryResultsPanel } from "@/components/lottery-results-panel"
|
||||
import { LokiMark } from "@/components/loki-mark"
|
||||
import { AppHeader } from "@/components/app-header"
|
||||
import { Skeleton } from "@/components/ui/skeleton"
|
||||
|
||||
export const instant = false
|
||||
@@ -26,25 +28,17 @@ export default async function Home({
|
||||
)
|
||||
}
|
||||
|
||||
function AppHeader() {
|
||||
return (
|
||||
<div className="h-14 border-b border-border/60 bg-card">
|
||||
<div className="mx-auto flex h-full max-w-6xl items-center gap-2 px-4 sm:px-6">
|
||||
<LokiMark className="h-8 w-8 shrink-0 text-accent" />
|
||||
<span className="text-base font-bold tracking-tight">LokiLoto</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
async function HomeContent({ activeCode }: { activeCode: string }) {
|
||||
const feed = await getArmyFeed()
|
||||
const [feed, member] = await Promise.all([getArmyFeed(), getCurrentMember()])
|
||||
const theme = countryTheme(activeCode)
|
||||
const lotteries = feed.lotteries.filter((l) => l.country === activeCode)
|
||||
const totalWins = lotteries.reduce((sum, l) => sum + l.lifetime.wins, 0)
|
||||
const totalTracked = lotteries.reduce((sum, l) => sum + l.lifetime.picksTracked, 0)
|
||||
const countryMembers = feed.army.byCountry[activeCode] ?? 0
|
||||
|
||||
const follows = member ? await listFollowedPicks(member.id) : []
|
||||
const followedKeys = new Set(follows.map((f) => `${f.lotteryId}:${f.targetDrawDate}`))
|
||||
|
||||
return (
|
||||
<div
|
||||
style={{ "--accent": theme.accent, "--accent-soft": theme.accentSoft } as React.CSSProperties}
|
||||
@@ -78,7 +72,12 @@ async function HomeContent({ activeCode }: { activeCode: string }) {
|
||||
</div>
|
||||
|
||||
{lotteries.length > 0 ? (
|
||||
<LotteryResultsPanel lotteries={lotteries} />
|
||||
<LotteryResultsPanel
|
||||
lotteries={lotteries}
|
||||
country={activeCode}
|
||||
followedKeys={followedKeys}
|
||||
isAuthenticated={!!member}
|
||||
/>
|
||||
) : (
|
||||
<div className="rounded-md border border-dashed border-border py-16 text-center text-sm text-muted-foreground">
|
||||
Aucune loterie suivie pour {theme.name} pour le moment.
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
"use server"
|
||||
|
||||
import { z } from "zod"
|
||||
import { revalidatePath } from "next/cache"
|
||||
import { prisma } from "@/lib/db"
|
||||
import { getCurrentMember } from "@/lib/member-auth"
|
||||
|
||||
const nicknameSchema = z.string().trim().min(2).max(24)
|
||||
|
||||
export interface NicknameState {
|
||||
ok: boolean
|
||||
message: string
|
||||
}
|
||||
|
||||
export async function setNicknameAction(_prev: NicknameState, formData: FormData): Promise<NicknameState> {
|
||||
const member = await getCurrentMember()
|
||||
if (!member) return { ok: false, message: "Non connecté." }
|
||||
|
||||
const parsed = nicknameSchema.safeParse(formData.get("nickname"))
|
||||
if (!parsed.success) return { ok: false, message: "Pseudo invalide (2 à 24 caractères)." }
|
||||
|
||||
await prisma.user.update({ where: { id: member.id }, data: { publicNickname: parsed.data } })
|
||||
revalidatePath("/profil")
|
||||
return { ok: true, message: "Pseudo mis à jour." }
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
import type { Metadata } from "next"
|
||||
import { redirect } from "next/navigation"
|
||||
import { getCurrentMember } from "@/lib/member-auth"
|
||||
import { listFollowedPicks } from "@/lib/follows"
|
||||
import { countryTheme } from "@/lib/countries"
|
||||
import { AppHeader } from "@/components/app-header"
|
||||
import { NicknameForm } from "@/components/nickname-form"
|
||||
import { Badge } from "@/components/ui/badge"
|
||||
|
||||
export const metadata: Metadata = { title: "Mon profil — LokiLoto" }
|
||||
export const instant = false
|
||||
|
||||
export default async function ProfilePage() {
|
||||
const member = await getCurrentMember()
|
||||
if (!member) redirect("/connexion?next=/profil")
|
||||
|
||||
const follows = await listFollowedPicks(member.id)
|
||||
|
||||
return (
|
||||
<main className="flex flex-1 flex-col">
|
||||
<AppHeader />
|
||||
<div className="mx-auto w-full max-w-3xl flex-1 px-4 py-6 sm:px-6">
|
||||
<h1 className="text-2xl font-bold tracking-tight">Mon profil</h1>
|
||||
<p className="mt-1 text-sm text-muted-foreground">{member.email}</p>
|
||||
|
||||
<div className="mt-6 rounded-md border border-border/60 bg-panel p-4">
|
||||
<h2 className="mb-2 text-sm font-semibold">Pseudo public</h2>
|
||||
<p className="mb-3 text-xs text-muted-foreground">
|
||||
Affiché au classement à la place de votre nom. Requis pour apparaître publiquement.
|
||||
</p>
|
||||
<NicknameForm currentNickname={member.publicNickname} />
|
||||
</div>
|
||||
|
||||
<div className="mt-6">
|
||||
<h2 className="mb-2 text-sm font-semibold">
|
||||
Pronostics suivis <Badge variant="secondary">{follows.length}</Badge>
|
||||
</h2>
|
||||
{follows.length === 0 ? (
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Vous ne suivez aucun pronostic de Loki pour l'instant. Suivez-en un depuis la page
|
||||
des résultats pour apparaître au classement.
|
||||
</p>
|
||||
) : (
|
||||
<div className="divide-y divide-border rounded-md border border-border/60 bg-panel">
|
||||
{follows.map((f) => {
|
||||
const theme = countryTheme(f.country)
|
||||
return (
|
||||
<div key={f.id} className="flex items-center justify-between px-4 py-2.5 text-sm">
|
||||
<span className="flex items-center gap-2">
|
||||
<span aria-hidden>{theme.flagEmoji}</span>
|
||||
{f.lotteryId}
|
||||
</span>
|
||||
<span className="text-xs text-muted-foreground">{f.targetDrawDate}</span>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user