diff --git a/Parse-Dashboard/app.js b/Parse-Dashboard/app.js index 76d8f30e6a..80abaaaea9 100644 --- a/Parse-Dashboard/app.js +++ b/Parse-Dashboard/app.js @@ -217,7 +217,6 @@ module.exports = function(config, options) { - `); @@ -258,7 +257,6 @@ module.exports = function(config, options) { - `); diff --git a/Parse-Dashboard/index.ejs b/Parse-Dashboard/index.ejs index 5ccf504d92..e4d8493a8d 100644 --- a/Parse-Dashboard/index.ejs +++ b/Parse-Dashboard/index.ejs @@ -35,6 +35,5 @@ - diff --git a/Parse-Dashboard/login.ejs b/Parse-Dashboard/login.ejs index f7d00cf744..297b74fb34 100644 --- a/Parse-Dashboard/login.ejs +++ b/Parse-Dashboard/login.ejs @@ -35,6 +35,5 @@ - diff --git a/src/dashboard/Dashboard.js b/src/dashboard/Dashboard.js index f3f8c95941..ead0ac2d67 100644 --- a/src/dashboard/Dashboard.js +++ b/src/dashboard/Dashboard.js @@ -41,8 +41,6 @@ import { setBasePath } from 'lib/AJAX'; // // import createClass from 'create-react-class'; import { Helmet } from 'react-helmet'; import Playground from './Data/Playground/Playground.react'; -import axios from 'lib/axios'; -import moment from 'moment'; import B4aConnectPage from './B4aConnectPage/B4aConnectPage.react'; // // import EmptyState from 'components/EmptyState/EmptyState.react'; import BlockchainPage from './BlockchainPage/BlockChainPage.react'; @@ -86,15 +84,6 @@ const AccountSettingsPage = () => ( ); -async function fetchHubUser() { - try { - // eslint-disable-next-line no-undef - return (await axios.get(`${b4aSettings.BACK4APP_API_PATH}/me/hub`, { withCredentials: true })).data; - } catch (err) { - throw err.response && err.response.data && err.response.data.error ? err.response.data.error : err - } -} - const PARSE_DOT_COM_SERVER_INFO = { features: { schemas: { @@ -132,23 +121,6 @@ const PARSE_DOT_COM_SERVER_INFO = { status: 'SUCCESS', } -const monthQuarter = { - '0': 'Q1', - '1': 'Q2', - '2': 'Q3', - '3': 'Q4' -}; - -const waitForScriptToLoad = async conditionFn => { - for (let i = 1; i <= 20; i++) { - if (conditionFn()) { - return; - } - await new Promise(resolve => setTimeout(resolve, i * 50)); - } - throw new Error('Script not loaded yet!'); -}; - export default class Dashboard extends React.Component { constructor(props) { super(); @@ -167,48 +139,6 @@ export default class Dashboard extends React.Component { componentDidMount() { get('/parse-dashboard-config.json').then(({ apps, newFeaturesInLatestVersion = [], user }) => { - fetchHubUser().then(userDetail => { - const now = moment(); - const hourDiff = now.diff(userDetail.createdAt, 'hours'); - if(hourDiff === 0){ - return; - } - if (userDetail.disableSolucxForm) { - return; - } - // Flow1 are users who signed up less than 30 days ago (720 hours) - const isFlow1 = hourDiff <= 720 ? true : false; - let transactionId = userDetail.id; - if(!isFlow1){ - const quarter = monthQuarter[parseInt(now.month() / 3)]; - transactionId += `${now.year()}${quarter}`; - } - const options = { - transaction_id: transactionId, - store_id: isFlow1 ? '1001' : '1002', - name: userDetail.username, - email: userDetail.username, - journey: isFlow1 ? 'csat-back4app' : 'nps-back4app', - }; - const retryInterval = isFlow1 ? 5 : 45; - const collectInterval = isFlow1 ? 30 : 90; - options.param_requestdata = encodeURIComponent(JSON.stringify({ - userDetail, - options, - localStorage: localStorage.getItem('solucxWidgetLog-' + userDetail.username) - })); - // eslint-disable-next-line no-undef - waitForScriptToLoad(() => typeof createSoluCXWidget === 'function').then(() => { - // eslint-disable-next-line no-undef - createSoluCXWidget( - process.env.SOLUCX_API_KEY, - 'bottomBoxLeft', - options, - { collectInterval, retryAttempts: 1, retryInterval } - ); - }).catch(err => console.log(err)); - }); - const stateApps = []; apps.forEach(app => { app.serverInfo = { status: 'LOADING' }; diff --git a/src/dashboard/Data/Browser/ImportDialog.react.js b/src/dashboard/Data/Browser/ImportDialog.react.js index 7da7a3f292..93c2d23bb7 100644 --- a/src/dashboard/Data/Browser/ImportDialog.react.js +++ b/src/dashboard/Data/Browser/ImportDialog.react.js @@ -37,7 +37,7 @@ export default class ImportDialog extends React.Component { icon='down-outline' iconSize={40} title='Import data' - subtitle={'You will receive an e-mail once your data is imported'} + subtitle={'You will receive an email once your data is imported'} confirmText='Import' cancelText='Cancel' disabled={!this.valid()} @@ -63,7 +63,7 @@ export default class ImportDialog extends React.Component { onChange={(file) => {this.setState({ file: file });}} />} /> {this.state.startedImport ? -
We are importing your data. You will be notified by e-mail once it is completed.
: null } +
We are importing your data. You will be notified by email once it is completed.
: null } {this.state.errorMessage ?
Import Request failed with the following error: "{ this.state.errorMessage }".
: null } diff --git a/src/dashboard/Data/Browser/ImportRelationDialog.react.js b/src/dashboard/Data/Browser/ImportRelationDialog.react.js index 9e07d322e3..de148f1ec2 100644 --- a/src/dashboard/Data/Browser/ImportRelationDialog.react.js +++ b/src/dashboard/Data/Browser/ImportRelationDialog.react.js @@ -38,7 +38,7 @@ export default class ImportRelationDialog extends React.Component { icon='down-outline' iconSize={40} title='Import relation data' - subtitle={'You will receive an e-mail once your data is imported'} + subtitle={'You will receive an email once your data is imported'} confirmText='Import' cancelText='Cancel' disabled={!this.valid()} @@ -71,7 +71,7 @@ export default class ImportRelationDialog extends React.Component { onChange={(file) => {this.setState({ file: file });}} />} /> {this.state.startedImport ? -
We are importing your data. You will be notified by e-mail once it is completed.
: null } +
We are importing your data. You will be notified by email once it is completed.
: null } {this.state.errorMessage ?
Import Request failed with the following error: "{ this.state.errorMessage }".
: null } diff --git a/webpack/base.config.js b/webpack/base.config.js index 681683cf9c..ef92bcf699 100644 --- a/webpack/base.config.js +++ b/webpack/base.config.js @@ -95,8 +95,7 @@ module.exports = { new webpack.DefinePlugin({ 'process.env': { 'version' : JSON.stringify(version), - 'BACKEND_URL': JSON.stringify(BACK4APP_API_PATH), - 'SOLUCX_API_KEY': JSON.stringify(settings.SOLUCX_API_KEY) + 'BACKEND_URL': JSON.stringify(BACK4APP_API_PATH) }, b4aSettings: JSON.stringify(settings) }),