DEV: removes jquery usage from links-redirect (#14968)

DEV: removes jquery usage from links-redirect (#14968)

diff --git a/app/assets/javascripts/discourse/app/components/links-redirect.js b/app/assets/javascripts/discourse/app/components/links-redirect.js
index 45996d8..c3e5369 100644
--- a/app/assets/javascripts/discourse/app/components/links-redirect.js
+++ b/app/assets/javascripts/discourse/app/components/links-redirect.js
@@ -2,16 +2,9 @@ import ClickTrack from "discourse/lib/click-track";
 import Component from "@ember/component";
 
 export default Component.extend({
-  didInsertElement() {
-    this._super(...arguments);
-
-    $(this.element).on("click.discourse-redirect", "a", (e) => {
-      return ClickTrack.trackClick(e, this.siteSettings);
-    });
-  },
-
-  willDestroyElement() {
-    this._super(...arguments);
-    $(this.element).off("click.discourse-redirect", "a");
+  click(event) {
+    if (event?.target?.tagName === "A") {
+      return ClickTrack.trackClick(event, this.siteSettings);
+    }
   },
 });

GitHub sha: 0fbeb2e5a2346abb597dcbe1d9f3b5eb73e04c95

This commit appears in #14968 which was approved by CvX. It was merged by jjaffeux.