add prettier formatter to all file
This commit is contained in:
@@ -5,42 +5,42 @@ import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
|
||||
function Item({ data, idx, loading }) {
|
||||
return (
|
||||
<li className="flex relative items-center justify-start gap-[8px] py-[12px] sm:py-[15px] md:py-[18px] lg:py-[20px]">
|
||||
<CustomLoading width={80} height={72} loading={loading}>
|
||||
<Link href={`/blog/${data.id}`}>
|
||||
<Image
|
||||
className="
|
||||
return (
|
||||
<li className="flex relative items-center justify-start gap-[8px] py-[12px] sm:py-[15px] md:py-[18px] lg:py-[20px]">
|
||||
<CustomLoading width={80} height={72} loading={loading}>
|
||||
<Link href={`/blog/${data.id}`}>
|
||||
<Image
|
||||
className="
|
||||
min-w-[64px] sm:min-w-[73px] md:min-w-[85px] lg:min-w-[97px]
|
||||
min-h-[56px] sm:min-h-[64px] md:min-h-[75px] lg:min-h-[88px]
|
||||
rounded-[8px] overflow-hidden object-cover
|
||||
"
|
||||
src={data.src}
|
||||
alt="article"
|
||||
height={88}
|
||||
width={97}
|
||||
/>
|
||||
</Link>
|
||||
</CustomLoading>
|
||||
<div className="flex flex-col gap-[16px] sm:gap-[18px] md:gap-[21px] lg:gap-[24px] items-start justify-between">
|
||||
<TextLoading width={150} height={18} loading={loading}>
|
||||
<Link href={`/blog/${data.id}`}>
|
||||
<p
|
||||
className="text-[#3B3B3B] text-[14px] md:text-[16px] font-bold text-wrap lg:text-nowrap"
|
||||
>{data.title}</p>
|
||||
</Link>
|
||||
</TextLoading>
|
||||
<TextLoading width={110} height={18} loading={loading}>
|
||||
<p
|
||||
className="text-[#9B9B9B] text-[12px] text-nowrap font-normal"
|
||||
>تاریخ انتشار: {data.date_of_release}</p>
|
||||
</TextLoading>
|
||||
</div>
|
||||
{data.id > idx + 1 && (
|
||||
<span className="block absolute right-0 bottom-0 w-full h-px bg-[#EFEFEF]"></span>
|
||||
)}
|
||||
</li>
|
||||
)
|
||||
src={data.src}
|
||||
alt="article"
|
||||
height={88}
|
||||
width={97}
|
||||
/>
|
||||
</Link>
|
||||
</CustomLoading>
|
||||
<div className="flex flex-col gap-[16px] sm:gap-[18px] md:gap-[21px] lg:gap-[24px] items-start justify-between">
|
||||
<TextLoading width={150} height={18} loading={loading}>
|
||||
<Link href={`/blog/${data.id}`}>
|
||||
<p className="text-[#3B3B3B] text-[14px] md:text-[16px] font-bold text-wrap lg:text-nowrap">
|
||||
{data.title}
|
||||
</p>
|
||||
</Link>
|
||||
</TextLoading>
|
||||
<TextLoading width={110} height={18} loading={loading}>
|
||||
<p className="text-[#9B9B9B] text-[12px] text-nowrap font-normal">
|
||||
تاریخ انتشار: {data.date_of_release}
|
||||
</p>
|
||||
</TextLoading>
|
||||
</div>
|
||||
{data.id > idx + 1 && (
|
||||
<span className="block absolute right-0 bottom-0 w-full h-px bg-[#EFEFEF]"></span>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
export default Item
|
||||
export default Item;
|
||||
|
||||
@@ -1,26 +1,21 @@
|
||||
import AnimationTextHead from '@/app/component/AnimationTextHead'
|
||||
import UnderlineLG from '@/components/icons/UnderlineLG'
|
||||
import React from 'react'
|
||||
import Item from './Item'
|
||||
import AnimationTextHead from "@/app/component/AnimationTextHead";
|
||||
import UnderlineLG from "@/components/icons/UnderlineLG";
|
||||
import React from "react";
|
||||
import Item from "./Item";
|
||||
|
||||
function RelatedContent({ data, loading }) {
|
||||
return (
|
||||
<div className='p-[12px] w-full lg:w-fit md:p-[14px] lg:p-[16px] bg-[#FFF] rounded-[8px] shadow-[0px_1px_24.8px_0px_rgba(204,_204,_204,_0.18)]'>
|
||||
<AnimationTextHead name='fade-up' text='مطالب مرتبط'>
|
||||
<div className="p-[12px] w-full lg:w-fit md:p-[14px] lg:p-[16px] bg-[#FFF] rounded-[8px] shadow-[0px_1px_24.8px_0px_rgba(204,_204,_204,_0.18)]">
|
||||
<AnimationTextHead name="fade-up" text="مطالب مرتبط">
|
||||
<UnderlineLG />
|
||||
</AnimationTextHead>
|
||||
<ul className='flex w-full lg:w-fit flex-col justify-start items-start'>
|
||||
<ul className="flex w-full lg:w-fit flex-col justify-start items-start">
|
||||
{data.map((item, idx) => (
|
||||
<Item
|
||||
idx={idx}
|
||||
data={item}
|
||||
key={item.id}
|
||||
loading={loading}
|
||||
/>
|
||||
<Item idx={idx} data={item} key={item.id} loading={loading} />
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export default RelatedContent
|
||||
export default RelatedContent;
|
||||
|
||||
Reference in New Issue
Block a user