'use client'; import Empty from "@/components/ui/empty"; import { useGetAIUserGifts } from "@/hooks/aiUser"; import { formatNumberToKMB } from "@/lib/utils"; import Image from "next/image"; export function GiftGrid({ userId }: { userId: string }) { const { data } = useGetAIUserGifts({ aiId: Number(userId), page: { pn: 1, ps: 100 } }); const { datas } = data || {}; if (datas && !datas.length) { return (

Gifts

) } return (

Gifts

{datas?.map((gift) => (
{gift.name
{gift.name} X{formatNumberToKMB(gift.getNum ?? 0)}
))}
); }