Skip to content

Commit

Permalink
🩹 Fix: pagination index
Browse files Browse the repository at this point in the history
  • Loading branch information
ilp-sys committed May 10, 2024
1 parent 07aec61 commit 5bf5742
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aeye/app/(nav)/home/SearchResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function NoResultTypography() {
const SearchResult: React.FC = () => {
const searchQuery = useRecoilValue(searchQueryState);
const [results, setResults] = useState<Vidarr | null>(null);
const [currentPage, setCurrentPage] = useState<number>(1);
const [currentPage, setCurrentPage] = useState<number>(0);

useEffect(() => {
let searchTimeout: NodeJS.Timeout;
Expand Down Expand Up @@ -76,7 +76,7 @@ const SearchResult: React.FC = () => {
>
<Vidgroup videos={results.videoDocuments} />
<Pagination
count={results.totalPage}
count={results.totalPage - 1}
page={currentPage}
onChange={handlePaginationChange}
size="large"
Expand Down

0 comments on commit 5bf5742

Please sign in to comment.