diff --git a/app/assets/javascripts/discourse/app/components/modal/share-topic.hbs b/app/assets/javascripts/discourse/app/components/modal/share-topic.hbs
index 8f66c59647d..680ab57639c 100644
--- a/app/assets/javascripts/discourse/app/components/modal/share-topic.hbs
+++ b/app/assets/javascripts/discourse/app/components/modal/share-topic.hbs
@@ -34,12 +34,8 @@
- {{#each this.sources as |s|}}
-
+ {{#each this.sources as |source|}}
+
{{/each}}
{{#if this.allowInvites}}
diff --git a/app/assets/javascripts/discourse/app/components/share-panel.hbs b/app/assets/javascripts/discourse/app/components/share-panel.hbs
index 690a6dfa7b4..0f024c13ccf 100644
--- a/app/assets/javascripts/discourse/app/components/share-panel.hbs
+++ b/app/assets/javascripts/discourse/app/components/share-panel.hbs
@@ -11,11 +11,7 @@
{{#each this.sources as |source|}}
-
+
{{/each}}
\ No newline at end of file
diff --git a/app/assets/javascripts/discourse/app/components/share-panel.js b/app/assets/javascripts/discourse/app/components/share-panel.js
index cd178a6e278..56805af04e5 100644
--- a/app/assets/javascripts/discourse/app/components/share-panel.js
+++ b/app/assets/javascripts/discourse/app/components/share-panel.js
@@ -1,4 +1,5 @@
import Component from "@ember/component";
+import { action } from "@ember/object";
import { alias } from "@ember/object/computed";
import { isEmpty } from "@ember/utils";
import Sharing from "discourse/lib/sharing";
@@ -58,12 +59,11 @@ export default Component.extend({
}, 200);
},
- actions: {
- share(source) {
- Sharing.shareSource(source, {
- url: this.shareUrl,
- title: this.get("topic.title"),
- });
- },
+ @action
+ share(source) {
+ Sharing.shareSource(source, {
+ url: this.shareUrl,
+ title: this.topic.get("title"),
+ });
},
});
diff --git a/app/assets/javascripts/discourse/app/components/share-source.gjs b/app/assets/javascripts/discourse/app/components/share-source.gjs
new file mode 100644
index 00000000000..2165048b8f0
--- /dev/null
+++ b/app/assets/javascripts/discourse/app/components/share-source.gjs
@@ -0,0 +1,15 @@
+import { fn } from "@ember/helper";
+import DButton from "discourse/components/d-button";
+import or from "truth-helpers/helpers/or";
+
+const ShareSource =
+
+;
+
+export default ShareSource;
diff --git a/app/assets/javascripts/discourse/app/components/share-source.hbs b/app/assets/javascripts/discourse/app/components/share-source.hbs
deleted file mode 100644
index b6184d53f7c..00000000000
--- a/app/assets/javascripts/discourse/app/components/share-source.hbs
+++ /dev/null
@@ -1,6 +0,0 @@
-
\ No newline at end of file
diff --git a/app/assets/javascripts/discourse/app/components/share-source.js b/app/assets/javascripts/discourse/app/components/share-source.js
deleted file mode 100644
index 972ffe3249f..00000000000
--- a/app/assets/javascripts/discourse/app/components/share-source.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import Component from "@ember/component";
-export default Component.extend({
- tagName: "",
-
- actions: {
- share(source) {
- this.action(source);
- },
- },
-});