diff --git a/src/react-components/scene-ui.js b/src/react-components/scene-ui.js
index 29d9dbde78..01fa06c453 100644
--- a/src/react-components/scene-ui.js
+++ b/src/react-components/scene-ui.js
@@ -7,9 +7,10 @@ import configs from "../utils/configs";
import { createAndRedirectToNewHub, getReticulumFetchUrl } from "../utils/phoenix-utils";
import { ReactComponent as CodeBranch } from "./icons/CodeBranch.svg";
import { ReactComponent as Pen } from "./icons/Pen.svg";
-import { ReactComponent as Twitter } from "./icons/Twitter.svg";
+import { ReactComponent as ShareIcon } from "./icons/Share.svg";
import IfFeature from "./if-feature";
import { AppLogo } from "./misc/AppLogo";
+import { share } from "../utils/share";
class SceneUI extends Component {
static propTypes = {
@@ -61,9 +62,13 @@ class SceneUI extends Component {
shareHashtag: configs.translation("share-hashtag")
}
);
- const tweetLink = `https://twitter.com/share?url=${encodeURIComponent(sceneUrl)}&text=${encodeURIComponent(
- tweetText
- )}`;
+ const onShareClick = async () => {
+ try {
+ await share({ url: sceneUrl, title: tweetText });
+ } catch (error) {
+ console.error(`while sharing (from scene UI):`, error);
+ }
+ };
const unknown = intl.formatMessage({ id: "scene-page.unknown", defaultMessage: "unknown" });
@@ -235,12 +240,10 @@ class SceneUI extends Component {
)
)}
-
-