diff --git a/components/page/detail-news.tsx b/components/page/detail-news.tsx index 0cfb100..b473064 100644 --- a/components/page/detail-news.tsx +++ b/components/page/detail-news.tsx @@ -67,22 +67,22 @@ export default function DetailNews(props: { data: any; listArticle: any }) { switch (platform) { case "facebook": shareLink = `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent( - urls + urls, )}`; break; case "x": shareLink = `https://x.com/intent/tweet?url=${encodeURIComponent( - urls + urls, )}&text=${encodeURIComponent(shareText)}`; break; case "linkedin": shareLink = `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent( - urls + urls, )}`; break; case "whatsapp": shareLink = `https://wa.me/?text=${encodeURIComponent( - shareText + " " + urls + shareText + " " + urls, )}`; break; default: @@ -97,14 +97,14 @@ export default function DetailNews(props: { data: any; listArticle: any }) { window.open( shareLink, "_blank", - `width=${popupWidth},height=${popupHeight},top=${top},left=${left},resizable=no,scrollbars=no,toolbar=no,menubar=no,status=no` + `width=${popupWidth},height=${popupHeight},top=${top},left=${left},resizable=no,scrollbars=no,toolbar=no,menubar=no,status=no`, ); }; useEffect(() => { if (listArticle) { const index = listArticle?.findIndex( - (item: any) => item?.id === data?.id + (item: any) => item?.id === data?.id, ); if (index - 1 == -1) { setPrevArticle(""); @@ -165,6 +165,18 @@ export default function DetailNews(props: { data: any; listArticle: any }) { {data?.viewCount === null ? 0 : data?.viewCount}

+ {data?.files?.length < 1 && data?.thumbnailUrl !== "" && ( + Main Image + )}{" "} +
{data?.files?.length > 0 ? ( data.files[0]?.file_name.split(".")[1].includes("doc") || @@ -273,11 +285,10 @@ export default function DetailNews(props: { data: any; listArticle: any }) { ))}
-

TAGS

@@ -306,7 +317,7 @@ export default function DetailNews(props: { data: any; listArticle: any }) { {tag} - ) + ), )}