Compare commits
2 Commits
6824575306
...
0fab52a16b
Author | SHA1 | Date | |
---|---|---|---|
0fab52a16b | |||
5bf0f8ac62 |
@ -93,7 +93,7 @@ export default async function Player({
|
||||
<main>
|
||||
<Container>
|
||||
<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>
|
||||
</Container>
|
||||
</main>
|
||||
|
@ -30,10 +30,22 @@ export default function Scores({
|
||||
|
||||
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) {
|
||||
if (sortTypee) {
|
||||
if (sortTypee.value !== sortType.value) {
|
||||
settingsStore?.setLastUsedSortType(sortTypee);
|
||||
}
|
||||
}
|
||||
router.push(
|
||||
`/player/${playerId}/scoresaber/${
|
||||
sortTypee ? sortTypee.value : sortType.value
|
||||
|
Loading…
x
Reference in New Issue
Block a user