fix:top article dashboard number, article author placeholder
This commit is contained in:
parent
0413d190e1
commit
e6994c1f8c
|
|
@ -108,6 +108,7 @@ export default function DashboardContainer() {
|
|||
limit: "4",
|
||||
page: page,
|
||||
search: "",
|
||||
sort: "desc",
|
||||
};
|
||||
const res = await getListArticleAdminPage(req);
|
||||
setArticle(res.data?.data);
|
||||
|
|
@ -128,6 +129,7 @@ export default function DashboardContainer() {
|
|||
limit: "10",
|
||||
page: topPagespage,
|
||||
search: "",
|
||||
sort: "desc",
|
||||
};
|
||||
const res = await getTopArticles(req);
|
||||
setTopPages(getTableNumber(10, res.data?.data));
|
||||
|
|
@ -152,7 +154,7 @@ export default function DashboardContainer() {
|
|||
|
||||
const getTableNumber = (limit: number, data: any) => {
|
||||
if (data) {
|
||||
const startIndex = limit * (page - 1);
|
||||
const startIndex = limit * (topPagespage - 1);
|
||||
let iterate = 0;
|
||||
const newData = data.map((value: any) => {
|
||||
iterate++;
|
||||
|
|
|
|||
|
|
@ -533,7 +533,7 @@ export default function ArticleTable() {
|
|||
isClearable={true}
|
||||
isSearchable={true}
|
||||
isMulti={true}
|
||||
placeholder="Kategori..."
|
||||
placeholder="Author..."
|
||||
name="sub-module"
|
||||
options={users}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue