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, imageUrl } from "@/helper"; function Item({ data, idx, loading }) { const cover = data?.images?.[0]?.url ? imageUrl(data.images[0].url) : ""; const createdDate = data?.created ? convertTimestampToJalali(data.created) : ""; return (
  • {cover && cover.trim() !== "" ? ( {data.title ) : (
    )}

    {data.title}

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

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