mirror of
https://github.com/fantasticit/think.git
synced 2026-10-30 22:56:06 +08:00
client: use page for pagination
This commit is contained in:
@@ -152,6 +152,7 @@ export const useAllPublicWikis = () => {
|
||||
data,
|
||||
loading: isLoading,
|
||||
error,
|
||||
page,
|
||||
setPage,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@ const { Title } = Typography;
|
||||
const PAGESIZE = 12;
|
||||
|
||||
const Page: NextPage = () => {
|
||||
const { data, loading, error, setPage } = useAllPublicWikis();
|
||||
const { data, loading, error, page, setPage } = useAllPublicWikis();
|
||||
|
||||
return (
|
||||
<SingleColumnLayout>
|
||||
@@ -62,7 +62,7 @@ const Page: NextPage = () => {
|
||||
/>
|
||||
{data.total > PAGESIZE && (
|
||||
<div style={{ display: 'flex', justifyContent: 'center' }}>
|
||||
<Pagination total={data.total} pageSize={PAGESIZE} onPageChange={setPage} />
|
||||
<Pagination total={data.total} currentPage={page} pageSize={PAGESIZE} onPageChange={setPage} />
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user