From a2808913594264c16d1f1ff29819cfbdb0ee86ff Mon Sep 17 00:00:00 2001 From: Mike Johnston Date: Sat, 21 Mar 2026 01:51:51 -0400 Subject: [PATCH] fix build err --- src/app/trades/page.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/app/trades/page.tsx b/src/app/trades/page.tsx index 150fed2..e3c0305 100644 --- a/src/app/trades/page.tsx +++ b/src/app/trades/page.tsx @@ -17,15 +17,20 @@ export default async function GlobalTradesPage({ searchParams }: PageProps) { const tradeWhere = { OR: [ - { hashtagId: { not: null }, type: { not: 'LOTTERY_WIN' } }, - { type: { in: ['FUND_INVEST', 'FUND_REDEEM'] } }, + { hashtagId: { not: null as string | null }, type: { not: 'LOTTERY_WIN' as const } }, + { type: { in: ['FUND_INVEST', 'FUND_REDEEM'] as ('FUND_INVEST' | 'FUND_REDEEM')[] } }, ], - } as const + } const [total, trades] = await Promise.all([ prisma.trade.count({ where: tradeWhere }), prisma.trade.findMany({ - where: tradeWhere, + where: { + OR: [ + { hashtagId: { not: null }, type: { not: 'LOTTERY_WIN' as const } }, + { type: { in: ['FUND_INVEST', 'FUND_REDEEM'] as const } }, + ], + }, orderBy: { createdAt: 'desc' }, take: PAGE_SIZE, skip: (page - 1) * PAGE_SIZE,