mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-30 11:57:35 +08:00
refactor: remove jquery in modals/edit-profile
This commit is contained in:
parent
966db65f67
commit
56a8e6b3b6
1 changed files with 10 additions and 6 deletions
|
|
@ -101,13 +101,17 @@ function hydrateInputs(): void {
|
|||
</button>`,
|
||||
);
|
||||
|
||||
$(".badgeSelectionItem").on("click", ({ currentTarget }) => {
|
||||
const selectionId = $(currentTarget).attr("selection-id") as string;
|
||||
currentSelectedBadgeId = parseInt(selectionId, 10);
|
||||
badgeIdsSelect
|
||||
?.qsa(".badgeSelectionItem")
|
||||
?.on("click", ({ currentTarget }) => {
|
||||
const selectionId = (currentTarget as HTMLElement).getAttribute(
|
||||
"selection-id",
|
||||
) as string;
|
||||
currentSelectedBadgeId = parseInt(selectionId, 10);
|
||||
|
||||
badgeIdsSelect?.qsa(".badgeSelectionItem")?.removeClass("selected");
|
||||
$(currentTarget).addClass("selected");
|
||||
});
|
||||
badgeIdsSelect?.qsa(".badgeSelectionItem")?.removeClass("selected");
|
||||
(currentTarget as HTMLElement).classList.add("selected");
|
||||
});
|
||||
|
||||
indicators.forEach((it) => it.hide());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue