You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
)
}
I have this above component That shows some post.But in my case pagination button are not calculated perfectly example i have 8 post if i want that 4 post should be render in one page so the total page should be 2(max) it can't go beyond that but in my case i have 4 tab some repeated data shows. Please help me out 🙏🏻
The text was updated successfully, but these errors were encountered:
function BlogDsList() {
const postsPerPage = 4;
const [items, setItems] = useState([]);
useEffect(() => {
client.fetch(
*[_type == 'post' && topic =='ds']{ ..., author->, categories[]-> } | order(_createdAt )
).then(res => {itemsToSend.push(...res);
});
}, []);
const action = (page, range, items) => {
console.log(
Page: ${page} 📃, Range: ${range} 🚀, Items: ${items} 🌀
);setItems(items);
};
return (
{post._updatedAt}
{post.title}
{post.description}
Read PostThe text was updated successfully, but these errors were encountered: