cache unknown beatsaver maps
All checks were successful
Deploy Backend / deploy (push) Successful in 2m53s
Deploy Website / deploy (push) Successful in 4m46s

This commit is contained in:
Lee
2024-10-17 16:24:10 +01:00
parent 73b7d17597
commit c72230a98d
4 changed files with 57 additions and 43 deletions

View File

@ -229,20 +229,22 @@ export default function PlayerScores({ initialScoreData, initialSearch, player,
))}
</motion.div>
<Pagination
mobilePagination={width < 768}
page={pageState.page}
totalPages={scores.metadata.totalPages}
loadingPage={isLoading ? pageState.page : undefined}
generatePageUrl={page => {
return getUrl(page);
}}
onPageChange={newPage => {
setPreviousPage(pageState.page);
setPageState({ ...pageState, page: newPage });
setShouldFetch(true); // Set to true to trigger fetch on page change
}}
/>
{scores.metadata.totalPages > 1 && (
<Pagination
mobilePagination={width < 768}
page={pageState.page}
totalPages={scores.metadata.totalPages}
loadingPage={isLoading ? pageState.page : undefined}
generatePageUrl={page => {
return getUrl(page);
}}
onPageChange={newPage => {
setPreviousPage(pageState.page);
setPageState({ ...pageState, page: newPage });
setShouldFetch(true); // Set to true to trigger fetch on page change
}}
/>
)}
</>
)}
</Card>