Compare commits
2 Commits
6824575306
...
0fab52a16b
Author | SHA1 | Date | |
---|---|---|---|
0fab52a16b | |||
5bf0f8ac62 |
@ -93,7 +93,7 @@ export default async function Player({
|
|||||||
<main>
|
<main>
|
||||||
<Container>
|
<Container>
|
||||||
<Card className="mt-2">
|
<Card className="mt-2">
|
||||||
<Error errorMessage="Failed to load player. Is the is valid?" />
|
<Error errorMessage="Failed to load player. Is the ID valid?" />
|
||||||
</Card>
|
</Card>
|
||||||
</Container>
|
</Container>
|
||||||
</main>
|
</main>
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user