This commit is contained in:
parent
5bf0f8ac62
commit
0fab52a16b
@ -30,10 +30,22 @@ export default function Scores({
|
|||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
const lastUsedSortType = settingsStore?.lastUsedSortType;
|
||||||
|
if (lastUsedSortType && lastUsedSortType != sortType) {
|
||||||
|
router.push(
|
||||||
|
`/player/${playerId}/scoresaber/${lastUsedSortType.value}/${page}`,
|
||||||
|
{
|
||||||
|
scroll: false,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function setPage(page: number, sortTypee?: SortType) {
|
function setPage(page: number, sortTypee?: SortType) {
|
||||||
if (sortTypee) {
|
if (sortTypee) {
|
||||||
|
if (sortTypee.value !== sortType.value) {
|
||||||
settingsStore?.setLastUsedSortType(sortTypee);
|
settingsStore?.setLastUsedSortType(sortTypee);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
router.push(
|
router.push(
|
||||||
`/player/${playerId}/scoresaber/${
|
`/player/${playerId}/scoresaber/${
|
||||||
sortTypee ? sortTypee.value : sortType.value
|
sortTypee ? sortTypee.value : sortType.value
|
||||||
|
Loading…
Reference in New Issue
Block a user