fix:detail article suggest article
This commit is contained in:
parent
45350a7132
commit
1df9197c5b
|
|
@ -259,6 +259,7 @@ export default function ListNews() {
|
|||
usedMonth && usedYear
|
||||
? convertDateFormatNoTimeV2(new Date(usedYear, usedMonth, 0))
|
||||
: "",
|
||||
timeStamp: getUnixTimestamp(),
|
||||
};
|
||||
|
||||
const response = await getListArticle(req);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,11 @@ import "swiper/css/pagination";
|
|||
import Link from "next/link";
|
||||
import { getListArticle } from "@/services/article";
|
||||
import { Card, CardFooter, Skeleton } from "@heroui/react";
|
||||
import { convertDateFormat, textEllipsis } from "@/utils/global";
|
||||
import {
|
||||
convertDateFormat,
|
||||
getUnixTimestamp,
|
||||
textEllipsis,
|
||||
} from "@/utils/global";
|
||||
import Image from "next/image";
|
||||
|
||||
export default function SidebarDetail() {
|
||||
|
|
@ -27,7 +31,9 @@ export default function SidebarDetail() {
|
|||
search: "",
|
||||
limit: "10",
|
||||
isPublish: true,
|
||||
category: "781,802",
|
||||
sort: "desc",
|
||||
categoryIds: "791,802",
|
||||
timeStamp: getUnixTimestamp(),
|
||||
};
|
||||
|
||||
const response = await getListArticle(req);
|
||||
|
|
@ -35,12 +41,14 @@ export default function SidebarDetail() {
|
|||
}
|
||||
|
||||
async function getArticlePolda() {
|
||||
console.log("jalan");
|
||||
const req = {
|
||||
page: 1,
|
||||
search: "",
|
||||
limit: "10",
|
||||
sort: "desc",
|
||||
isPublish: true,
|
||||
isPolda: true,
|
||||
timeStamp: getUnixTimestamp(),
|
||||
};
|
||||
|
||||
const response = await getListArticle(req);
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ export async function getListArticle(props: PaginationRequest) {
|
|||
categoryIds,
|
||||
createdByIds,
|
||||
isPolda,
|
||||
timeStamp,
|
||||
} = props;
|
||||
const headers = {
|
||||
"content-type": "application/json",
|
||||
|
|
@ -37,7 +38,7 @@ export async function getListArticle(props: PaginationRequest) {
|
|||
sort || "desc"
|
||||
}&category=${categorySlug || ""}&isBanner=${isBanner || ""}&categoryIds=${
|
||||
categoryIds || ""
|
||||
}&createdByIds=${createdByIds || ""}&isPolda=${isPolda || ""}`,
|
||||
}&createdByIds=${createdByIds || ""}&isPolda=${isPolda || ""}&timeStamp=${timeStamp || ""}`,
|
||||
headers,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue