diff --git a/frontend/src/styles/core.scss b/frontend/src/styles/core.scss index 55075a107..555a9739b 100644 --- a/frontend/src/styles/core.scss +++ b/frontend/src/styles/core.scss @@ -84,7 +84,7 @@ a { } } -a[data-link] * { +a[router-link] * { pointer-events: none; } diff --git a/frontend/src/ts/controllers/route-controller.ts b/frontend/src/ts/controllers/route-controller.ts index 16fba205c..1b3c9f8da 100644 --- a/frontend/src/ts/controllers/route-controller.ts +++ b/frontend/src/ts/controllers/route-controller.ts @@ -156,7 +156,7 @@ window.addEventListener("popstate", () => { document.addEventListener("DOMContentLoaded", () => { document.body.addEventListener("click", (e) => { const target = e?.target as HTMLLinkElement; - if (target.matches("[data-link]") && target?.href) { + if (target.matches("[router-link]") && target?.href) { e.preventDefault(); navigate(target.href); } diff --git a/frontend/src/ts/elements/leaderboards.ts b/frontend/src/ts/elements/leaderboards.ts index b504d0441..be82a638f 100644 --- a/frontend/src/ts/elements/leaderboards.ts +++ b/frontend/src/ts/elements/leaderboards.ts @@ -324,7 +324,7 @@ async function fillTable(lb: LbKey, prepend?: number): Promise {
${avatar} ${entry.name} + } router-link>${entry.name} ${entry.badgeId ? getBadgeHTMLbyId(entry.badgeId) : ""}
diff --git a/frontend/static/html/pages/404.html b/frontend/static/html/pages/404.html index f010c8851..3b1f3a38f 100644 --- a/frontend/static/html/pages/404.html +++ b/frontend/static/html/pages/404.html @@ -2,7 +2,7 @@
Ooops! Looks like you found a page that doesn't exist.
- + Go Home diff --git a/frontend/static/html/pages/test.html b/frontend/static/html/pages/test.html index 03a332515..c140aeabd 100644 --- a/frontend/static/html/pages/test.html +++ b/frontend/static/html/pages/test.html @@ -179,7 +179,7 @@
- Sign in + Sign in to save your result
diff --git a/frontend/static/html/top.html b/frontend/static/html/top.html index 84c963d03..5edc30218 100644 --- a/frontend/static/html/top.html +++ b/frontend/static/html/top.html @@ -50,7 +50,7 @@ tabindex="2" href="/" onclick="this.blur();" - data-link + router-link >
@@ -70,7 +70,7 @@ tabindex="2" href="/about" onclick="this.blur();" - data-link + router-link >
@@ -93,7 +93,7 @@ tabindex="2" href="/settings" onclick="this.blur();" - data-link + router-link >
@@ -104,7 +104,7 @@ tabindex="2" href="/account" onclick="this.blur();" - data-link + router-link >
@@ -125,7 +125,7 @@ tabindex="2" href="/login" onclick="this.blur();" - data-link + router-link >