fix:detail article space

This commit is contained in:
Rama Priyanto 2025-02-11 15:39:23 +07:00
parent 497ebc949f
commit ec2e0ef1b8
1 changed files with 11 additions and 9 deletions

View File

@ -153,15 +153,17 @@ export default function DetailNews(props: { data: any; listArticle: any }) {
</p>
</div>
<div className="flex justify-center my-2 lg:my-5">
<Image
width={1440}
height={1080}
alt="Main Image"
src={data?.files[imageNow]?.file_url}
className="object-cover w-[100%] rounded-md"
/>
{data?.files?.length > 0 && (
<Image
width={1440}
height={1080}
alt="Main Image"
src={data?.files[imageNow]?.file_url}
className="object-cover w-[100%] rounded-md"
/>
)}
</div>
{data?.files?.length > 1 && (
{data?.files?.length > 0 && (
<div className="flex flex-row gap-3 flex-nowrap overflow-x-auto">
{data?.files?.map((file: any, index: number) => (
<a
@ -184,7 +186,7 @@ export default function DetailNews(props: { data: any; listArticle: any }) {
dangerouslySetInnerHTML={removeImgTags(
formatTextToHtmlTag(data?.htmlDescription)
)}
className="text-sm lg:text-xl lg:leading-8 text-justify"
className="text-sm lg:text-xl lg:leading-8 text-justify space-y-4"
/>
<div className="grid grid-cols-2 md:grid-cols-4 gap-2 lg:gap-5 my-8">