This commit is contained in:
parent
5bf0f8ac62
commit
0fab52a16b
@ -30,9 +30,21 @@ 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) {
|
||||||
settingsStore?.setLastUsedSortType(sortTypee);
|
if (sortTypee.value !== sortType.value) {
|
||||||
|
settingsStore?.setLastUsedSortType(sortTypee);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
router.push(
|
router.push(
|
||||||
`/player/${playerId}/scoresaber/${
|
`/player/${playerId}/scoresaber/${
|
||||||
|
Loading…
Reference in New Issue
Block a user