From 8178303e3aedd2ce585117aa02b9a49df3842304 Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Thu, 17 Jan 2019 16:36:36 +0100 Subject: [PATCH] Make link press handler work --- components/helpers/replace-url-with-text.js | 3 +++ components/license.js | 2 +- components/settings/about.js | 4 ++-- components/settings/license.js | 2 +- components/settings/nfp-settings/index.js | 2 +- i18n/en/settings.js | 4 ++-- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/components/helpers/replace-url-with-text.js b/components/helpers/replace-url-with-text.js index a490333..69493eb 100644 --- a/components/helpers/replace-url-with-text.js +++ b/components/helpers/replace-url-with-text.js @@ -2,5 +2,8 @@ import {links} from '../../i18n/en/settings' export default function(url) { const link = Object.values(links).find(link => link.url === url) + if (url === 'mailto:bloodyhealth@mailbox.org') { + console.log(links.email.url === url) + } return link ? link.text : url } \ No newline at end of file diff --git a/components/license.js b/components/license.js index 8fdfc9e..051e4ec 100644 --- a/components/license.js +++ b/components/license.js @@ -13,7 +13,7 @@ const labels = settingsLabels.license export default function License({setLicense}) { return ( - + {labels.title} {labels.text} diff --git a/components/settings/about.js b/components/settings/about.js index 9e33402..c944d4a 100644 --- a/components/settings/about.js +++ b/components/settings/about.js @@ -12,7 +12,7 @@ export default class AboutSection extends Component { return ( - + {labels.aboutSection.text} @@ -23,7 +23,7 @@ export default class AboutSection extends Component { {labels.credits.note} - + {links.website.url} diff --git a/components/settings/license.js b/components/settings/license.js index 342193d..d3baf8c 100644 --- a/components/settings/license.js +++ b/components/settings/license.js @@ -11,7 +11,7 @@ export default class License extends Component { return ( - + {`${labels.license.title} `} {`${labels.license.text} `} diff --git a/components/settings/nfp-settings/index.js b/components/settings/nfp-settings/index.js index a95c5de..be392b5 100644 --- a/components/settings/nfp-settings/index.js +++ b/components/settings/nfp-settings/index.js @@ -33,7 +33,7 @@ export default class Settings extends Component { {`${labels.preOvu.title} `} - + {labels.preOvu.note} diff --git a/i18n/en/settings.js b/i18n/en/settings.js index 19c13f0..937f87a 100644 --- a/i18n/en/settings.js +++ b/i18n/en/settings.js @@ -5,7 +5,7 @@ export const links = { text: 'GitLab' }, email: { - url: 'mailto:bl00dyhealth@mailbox.org', + url: 'mailto:bloodyhealth@mailbox.org', text: 'email' }, wiki: { @@ -124,7 +124,7 @@ export default { This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details: https://www.gnu.org/licenses/gpl-3.0.html -You can contact us by email at bloodyhealth@mailbox.com.` +You can contact us by bloodyhealth@mailbox.org.` }, version: { title: 'Version'