make urls look less awful (remove query params)
All checks were successful
deploy / deploy (push) Successful in 53s

This commit is contained in:
Lee
2023-10-24 12:56:28 +01:00
parent 3e10b0108b
commit 171dfd9cc0
12 changed files with 47 additions and 84 deletions

View File

@ -66,18 +66,9 @@ export default function Scores({ playerData, page, sortType }: ScoresProps) {
});
settingsStore?.setLastUsedSortType(sortType);
if (page > 1) {
router.push(
`/player/${playerId}?page=${page}&sort=${sortType.value}`,
{
scroll: false,
},
);
} else {
router.push(`/player/${playerId}?sort=${sortType.value}`, {
scroll: false,
});
}
router.push(`/player/${playerId}/${sortType.value}/${page}`, {
scroll: false,
});
console.log(`Switched page to ${page} with sort ${sortType.value}`);
},