From f0e3b6a8666ff3ea8e02528ec7ecd04b415fa300 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Tue, 7 Apr 2020 15:52:57 +0800 Subject: [PATCH] fix skin library page --- resources/assets/src/views/skinlib/SkinLibrary/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/assets/src/views/skinlib/SkinLibrary/index.tsx b/resources/assets/src/views/skinlib/SkinLibrary/index.tsx index f00ddfd12..d0d4fd33a 100644 --- a/resources/assets/src/views/skinlib/SkinLibrary/index.tsx +++ b/resources/assets/src/views/skinlib/SkinLibrary/index.tsx @@ -47,7 +47,7 @@ const SkinLibrary: React.FC = () => { setSort(search.get('sort') ?? 'time') - setPage(Number.parseInt(search.get('page') ?? '0')) + setPage(Number.parseInt(search.get('page') ?? '1')) } parseSearch(location.search) @@ -81,7 +81,6 @@ const SkinLibrary: React.FC = () => { search, ) setItems(result.data) - setPage(result.current_page) setTotalPages(result.last_page) setIsLoading(false) } @@ -118,6 +117,7 @@ const SkinLibrary: React.FC = () => { setKeyword('') setSort('time') setUploader(0) + setPage(1) } const handleUploaderClick = (uploader: number) => setUploader(uploader)