Skip to content

Commit

Permalink
fix(result page): clicking on daily leaderboard rank not navigating t…
Browse files Browse the repository at this point in the history
…o the leaderboards page

closes monkeytypegame#6311
  • Loading branch information
Miodec committed Feb 27, 2025
1 parent ff2b354 commit 04797b2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions frontend/src/ts/event-handlers/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import * as QuoteReportModal from "../modals/quote-report";
import * as QuoteSearchModal from "../modals/quote-search";
import * as CustomTextModal from "../modals/custom-text";
import * as PractiseWordsModal from "../modals/practise-words";
import { navigate } from "../controllers/route-controller";
import { getMode2 } from "../utils/misc";

$(".pageTest").on("click", "#testModesNotice .textButton", async (event) => {
const attr = $(event.currentTarget).attr("commands");
Expand Down Expand Up @@ -84,3 +86,12 @@ $(".pageTest").on("click", "#practiseWordsButton", () => {
}
PractiseWordsModal.show();
});

$(".pageTest #dailyLeaderboardRank").on("click", async () => {
navigate(
`/leaderboards?type=daily&language=${Config.language}&mode2=${getMode2(
Config,
null
)}`
);
});

0 comments on commit 04797b2

Please sign in to comment.