Skip to content

Commit 0d68145

Browse files
committed
fix: change share text
1 parent 502cbc5 commit 0d68145

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

src/components/Suggestions.tsx

+6-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
import { pinSelector } from '../store/reselect/settings';
2424
import { useAppDispatch, useAppSelector } from '../hooks/redux';
2525
import type { RootNavigationProp } from '../navigation/types';
26-
import { appName, shareText } from '../constants/app';
26+
import { appName, appStoreUrl, playStoreUrl } from '../constants/app';
2727
import { getDurationForBlocks } from '../utils/helpers';
2828

2929
const Suggestions = (): ReactElement => {
@@ -60,9 +60,11 @@ const Suggestions = (): ReactElement => {
6060
useFocusEffect(useCallback(() => setIndex(0), []));
6161

6262
const onShare = useCallback(async (): Promise<void> => {
63-
await Share.share({ title: appName, message: shareText });
64-
dispatch(hideTodo('invite'));
65-
}, [dispatch]);
63+
await Share.share({
64+
title: appName,
65+
message: t('settings:about.shareText', { playStoreUrl, appStoreUrl }),
66+
});
67+
}, [t]);
6668

6769
const handleOnPress = useCallback(
6870
(id: TTodoType): void => {

src/constants/app.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
import { Platform } from 'react-native';
21
import { getBundleId } from 'react-native-device-info';
32

43
export const appName = 'Bitkit';
5-
const appStoreUrl = 'https://apps.apple.com/app/bitkit-wallet/id6502440655';
6-
const playStoreUrl = `https://play.google.com/store/apps/details?id=${getBundleId()}`;
7-
const storeUrl = Platform.OS === 'ios' ? appStoreUrl : playStoreUrl;
8-
9-
export const shareText = `Download Bitkit, a self-custodial wallet powering lightning-fast bitcoin payments. Hold your keys, unlock your sovereignty. ${storeUrl}`;
4+
export const appStoreUrl =
5+
'https://apps.apple.com/app/bitkit-wallet/id6502440655';
6+
export const playStoreUrl = `https://play.google.com/store/apps/details?id=${getBundleId()}`;

src/screens/Settings/About/index.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import SafeAreaInset from '../../../components/SafeAreaInset';
1616
import Social from '../../../components/Social';
1717
import SettingsView from '../SettingsView';
1818
import { openURL } from '../../../utils/helpers';
19-
import { appName, shareText } from '../../../constants/app';
19+
import { appName, appStoreUrl, playStoreUrl } from '../../../constants/app';
2020

2121
const imageSrc = require('../../../assets/logo.png');
2222

@@ -45,8 +45,11 @@ const About = (): ReactElement => {
4545
// }, []);
4646

4747
const onShare = useCallback(async (): Promise<void> => {
48-
await Share.share({ title: appName, message: shareText });
49-
}, []);
48+
await Share.share({
49+
title: appName,
50+
message: t('about.shareText', { playStoreUrl, appStoreUrl }),
51+
});
52+
}, [t]);
5053

5154
const listData: IListData[] = useMemo(
5255
() => [

src/utils/i18n/locales/en/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"text": "Thank you for being a responsible Bitcoiner.\nChange your wallet, change the world.\n\nBitkit hands you the keys to your money, profile, contacts, and web accounts.\n\nBitkit was crafted by Synonym Software Ltd.",
1616
"legal": "Legal",
1717
"share": "Share",
18-
"version": "Version"
18+
"version": "Version",
19+
"shareText": "Change your wallet, change the world. Download Bitkit for iPhone {appStoreUrl} or Android {playStoreUrl}"
1920
},
2021
"dev_title": "Dev Settings",
2122
"general": {

0 commit comments

Comments
 (0)