import CircularLoading from "@/app/component/loading/Circular"; import CustomLoading from "@/app/component/loading/Custom"; import TextLoading from "@/app/component/loading/Text"; import Link from "next/link"; import { convertTimestampToJalali } from "@/helper"; function Item({ data, idx, loading }) { const imageUrl = data?.images?.[0]?.url; const createdDate = data?.created ? convertTimestampToJalali(data.created) : ""; return (
  • {imageUrl && imageUrl.trim() !== "" ? ( {data.title ) : (
    )}

    {data.title}

    {createdDate && `تاریخ انتشار: ${createdDate}`}

    {idx > 0 && ( )}
  • ); } export default Item;