import { LeagueWalletPageQuery } from '@/lib/page-queries/LeagueWalletPageQuery'; import { LeagueWalletPageClient } from '@/client-wrapper/LeagueWalletPageClient'; import { notFound } from 'next/navigation'; interface Props { params: Promise<{ id: string }>; } export default async function LeagueWalletPage({ params }: Props) { const { id: leagueId } = await params; if (!leagueId) { notFound(); } const result = await LeagueWalletPageQuery.execute(leagueId); if (result.isErr()) { const error = result.getError(); if (error === 'notFound') { notFound(); } // For serverError, show the template with empty data return ; } return ; }