fix:top article dashboard number, article author placeholder

This commit is contained in:
Rama Priyanto 2025-05-26 08:54:54 +07:00
parent 0413d190e1
commit e6994c1f8c
2 changed files with 4 additions and 2 deletions

View File

@ -108,6 +108,7 @@ export default function DashboardContainer() {
limit: "4", limit: "4",
page: page, page: page,
search: "", search: "",
sort: "desc",
}; };
const res = await getListArticleAdminPage(req); const res = await getListArticleAdminPage(req);
setArticle(res.data?.data); setArticle(res.data?.data);
@ -128,6 +129,7 @@ export default function DashboardContainer() {
limit: "10", limit: "10",
page: topPagespage, page: topPagespage,
search: "", search: "",
sort: "desc",
}; };
const res = await getTopArticles(req); const res = await getTopArticles(req);
setTopPages(getTableNumber(10, res.data?.data)); setTopPages(getTableNumber(10, res.data?.data));
@ -152,7 +154,7 @@ export default function DashboardContainer() {
const getTableNumber = (limit: number, data: any) => { const getTableNumber = (limit: number, data: any) => {
if (data) { if (data) {
const startIndex = limit * (page - 1); const startIndex = limit * (topPagespage - 1);
let iterate = 0; let iterate = 0;
const newData = data.map((value: any) => { const newData = data.map((value: any) => {
iterate++; iterate++;

View File

@ -533,7 +533,7 @@ export default function ArticleTable() {
isClearable={true} isClearable={true}
isSearchable={true} isSearchable={true}
isMulti={true} isMulti={true}
placeholder="Kategori..." placeholder="Author..."
name="sub-module" name="sub-module"
options={users} options={users}
/> />