From aa6689e6158efde28b68948cd8b67d55080158d2 Mon Sep 17 00:00:00 2001 From: Vijay Raghavan Aravamudhan Date: Sat, 5 Jun 2021 16:28:45 +0530 Subject: Removed hardcoded strings and reused constants defined in config.js (#1499) --- src/containers/settings/AccountScreen.js | 3 ++- src/containers/settings/TeamScreen.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/containers/settings') diff --git a/src/containers/settings/AccountScreen.js b/src/containers/settings/AccountScreen.js index 12c912bac..98e212192 100644 --- a/src/containers/settings/AccountScreen.js +++ b/src/containers/settings/AccountScreen.js @@ -10,6 +10,7 @@ import SettingsStore from '../../stores/SettingsStore'; import AccountDashboard from '../../components/settings/account/AccountDashboard'; import ErrorBoundary from '../../components/util/ErrorBoundary'; +import { LIVE_FRANZ_API } from '../../config'; import { WEBSITE } from '../../environment'; export default @@ -35,7 +36,7 @@ class AccountScreen extends Component { const api = stores.settings.all.app.server; let url; - if (api === 'https://api.franzinfra.com') { + if (api === LIVE_FRANZ_API) { url = stores.user.getAuthURL( `${WEBSITE}${route}?utm_source=app&utm_medium=account_dashboard`, ); diff --git a/src/containers/settings/TeamScreen.js b/src/containers/settings/TeamScreen.js index 3e21ca2d9..c1360a666 100644 --- a/src/containers/settings/TeamScreen.js +++ b/src/containers/settings/TeamScreen.js @@ -8,12 +8,13 @@ import SettingsStore from '../../stores/SettingsStore'; import TeamDashboard from '../../components/settings/team/TeamDashboard'; import ErrorBoundary from '../../components/util/ErrorBoundary'; +import { DEV_API_FRANZ_WEBSITE } from '../../config'; export default @inject('stores', 'actions') @observer class TeamScreen extends Component { handleWebsiteLink(route) { const { actions, stores } = this.props; - const url = `https://meetfranz.com/${route}?authToken=${stores.user.authToken}&utm_source=app&utm_medium=account_dashboard`; + const url = `${DEV_API_FRANZ_WEBSITE}/${route}?authToken=${stores.user.authToken}&utm_source=app&utm_medium=account_dashboard`; actions.app.openExternalUrl({ url }); } -- cgit v1.2.3-54-g00ecf