aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/settings
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-02-21 15:25:45 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-02-21 15:25:45 +0100
commit71e3d7310a06305c3c15685364ea8e20fc720867 (patch)
tree142ef1cc0ad793ea40cb8ea4f6d5c649cf4e0e3c /src/containers/settings
parentAdd pageview event (diff)
downloadferdium-app-71e3d7310a06305c3c15685364ea8e20fc720867.tar.gz
ferdium-app-71e3d7310a06305c3c15685364ea8e20fc720867.tar.zst
ferdium-app-71e3d7310a06305c3c15685364ea8e20fc720867.zip
Simplify analytics calls
Diffstat (limited to 'src/containers/settings')
-rw-r--r--src/containers/settings/AccountScreen.js5
-rw-r--r--src/containers/settings/EditServiceScreen.js5
-rw-r--r--src/containers/settings/EditSettingsScreen.js5
-rw-r--r--src/containers/settings/EditUserScreen.js5
-rw-r--r--src/containers/settings/InviteScreen.js6
-rw-r--r--src/containers/settings/RecipesScreen.js6
-rw-r--r--src/containers/settings/ServicesScreen.js5
7 files changed, 0 insertions, 37 deletions
diff --git a/src/containers/settings/AccountScreen.js b/src/containers/settings/AccountScreen.js
index d681d5226..ce1b9c333 100644
--- a/src/containers/settings/AccountScreen.js
+++ b/src/containers/settings/AccountScreen.js
@@ -6,7 +6,6 @@ import { inject, observer } from 'mobx-react';
6import PaymentStore from '../../stores/PaymentStore'; 6import PaymentStore from '../../stores/PaymentStore';
7import UserStore from '../../stores/UserStore'; 7import UserStore from '../../stores/UserStore';
8import AppStore from '../../stores/AppStore'; 8import AppStore from '../../stores/AppStore';
9import { gaPage } from '../../lib/analytics';
10 9
11import AccountDashboard from '../../components/settings/account/AccountDashboard'; 10import AccountDashboard from '../../components/settings/account/AccountDashboard';
12import ErrorBoundary from '../../components/util/ErrorBoundary'; 11import ErrorBoundary from '../../components/util/ErrorBoundary';
@@ -22,10 +21,6 @@ export default @inject('stores', 'actions') @observer class AccountScreen extend
22 user.getUserInfoRequest.invalidate({ immediately: true }); 21 user.getUserInfoRequest.invalidate({ immediately: true });
23 } 22 }
24 23
25 componentDidMount() {
26 gaPage('Settings/Account Dashboard');
27 }
28
29 onCloseWindow() { 24 onCloseWindow() {
30 const { user, payment } = this.props.stores; 25 const { user, payment } = this.props.stores;
31 user.getUserInfoRequest.invalidate({ immediately: true }); 26 user.getUserInfoRequest.invalidate({ immediately: true });
diff --git a/src/containers/settings/EditServiceScreen.js b/src/containers/settings/EditServiceScreen.js
index d08f0a52e..870ca4ecd 100644
--- a/src/containers/settings/EditServiceScreen.js
+++ b/src/containers/settings/EditServiceScreen.js
@@ -9,7 +9,6 @@ import ServicesStore from '../../stores/ServicesStore';
9import SettingsStore from '../../stores/SettingsStore'; 9import SettingsStore from '../../stores/SettingsStore';
10import FeaturesStore from '../../stores/FeaturesStore'; 10import FeaturesStore from '../../stores/FeaturesStore';
11import Form from '../../lib/Form'; 11import Form from '../../lib/Form';
12import { gaPage } from '../../lib/analytics';
13 12
14import ServiceError from '../../components/settings/services/ServiceError'; 13import ServiceError from '../../components/settings/services/ServiceError';
15import EditServiceForm from '../../components/settings/services/EditServiceForm'; 14import EditServiceForm from '../../components/settings/services/EditServiceForm';
@@ -93,10 +92,6 @@ export default @inject('stores', 'actions') @observer class EditServiceScreen ex
93 intl: intlShape, 92 intl: intlShape,
94 }; 93 };
95 94
96 componentDidMount() {
97 gaPage('Settings/Service/Edit');
98 }
99
100 onSubmit(data) { 95 onSubmit(data) {
101 const { action } = this.props.router.params; 96 const { action } = this.props.router.params;
102 const { recipes, services } = this.props.stores; 97 const { recipes, services } = this.props.stores;
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js
index 992c49b09..97c1fa3b1 100644
--- a/src/containers/settings/EditSettingsScreen.js
+++ b/src/containers/settings/EditSettingsScreen.js
@@ -8,7 +8,6 @@ import SettingsStore from '../../stores/SettingsStore';
8import UserStore from '../../stores/UserStore'; 8import UserStore from '../../stores/UserStore';
9import Form from '../../lib/Form'; 9import Form from '../../lib/Form';
10import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; 10import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages';
11import { gaPage } from '../../lib/analytics';
12import { DEFAULT_APP_SETTINGS } from '../../config'; 11import { DEFAULT_APP_SETTINGS } from '../../config';
13import { config as spellcheckerConfig } from '../../features/spellchecker'; 12import { config as spellcheckerConfig } from '../../features/spellchecker';
14 13
@@ -75,10 +74,6 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
75 intl: intlShape, 74 intl: intlShape,
76 }; 75 };
77 76
78 componentDidMount() {
79 gaPage('Settings/App');
80 }
81
82 onSubmit(settingsData) { 77 onSubmit(settingsData) {
83 const { app, settings, user } = this.props.actions; 78 const { app, settings, user } = this.props.actions;
84 79
diff --git a/src/containers/settings/EditUserScreen.js b/src/containers/settings/EditUserScreen.js
index 3d35effc5..bade928a0 100644
--- a/src/containers/settings/EditUserScreen.js
+++ b/src/containers/settings/EditUserScreen.js
@@ -9,7 +9,6 @@ import EditUserForm from '../../components/settings/user/EditUserForm';
9import ErrorBoundary from '../../components/util/ErrorBoundary'; 9import ErrorBoundary from '../../components/util/ErrorBoundary';
10 10
11import { required, email, minLength } from '../../helpers/validation-helpers'; 11import { required, email, minLength } from '../../helpers/validation-helpers';
12import { gaPage } from '../../lib/analytics';
13 12
14const messages = defineMessages({ 13const messages = defineMessages({
15 firstname: { 14 firstname: {
@@ -57,10 +56,6 @@ export default @inject('stores', 'actions') @observer class EditUserScreen exten
57 intl: intlShape, 56 intl: intlShape,
58 }; 57 };
59 58
60 componentDidMount() {
61 gaPage('Settings/Account/Edit');
62 }
63
64 componentWillUnmount() { 59 componentWillUnmount() {
65 this.props.actions.user.resetStatus(); 60 this.props.actions.user.resetStatus();
66 } 61 }
diff --git a/src/containers/settings/InviteScreen.js b/src/containers/settings/InviteScreen.js
index cd36610e4..cc36849e8 100644
--- a/src/containers/settings/InviteScreen.js
+++ b/src/containers/settings/InviteScreen.js
@@ -5,13 +5,7 @@ import { inject, observer } from 'mobx-react';
5import Invite from '../../components/auth/Invite'; 5import Invite from '../../components/auth/Invite';
6import ErrorBoundary from '../../components/util/ErrorBoundary'; 6import ErrorBoundary from '../../components/util/ErrorBoundary';
7 7
8import { gaPage } from '../../lib/analytics';
9
10export default @inject('stores', 'actions') @observer class InviteScreen extends Component { 8export default @inject('stores', 'actions') @observer class InviteScreen extends Component {
11 componentDidMount() {
12 gaPage('Settings/Invite');
13 }
14
15 componentWillUnmount() { 9 componentWillUnmount() {
16 this.props.stores.user.inviteRequest.reset(); 10 this.props.stores.user.inviteRequest.reset();
17 } 11 }
diff --git a/src/containers/settings/RecipesScreen.js b/src/containers/settings/RecipesScreen.js
index b3d758c87..eda5ae54c 100644
--- a/src/containers/settings/RecipesScreen.js
+++ b/src/containers/settings/RecipesScreen.js
@@ -7,7 +7,6 @@ import RecipePreviewsStore from '../../stores/RecipePreviewsStore';
7import RecipeStore from '../../stores/RecipesStore'; 7import RecipeStore from '../../stores/RecipesStore';
8import ServiceStore from '../../stores/ServicesStore'; 8import ServiceStore from '../../stores/ServicesStore';
9import UserStore from '../../stores/UserStore'; 9import UserStore from '../../stores/UserStore';
10import { gaPage } from '../../lib/analytics';
11 10
12import RecipesDashboard from '../../components/settings/recipes/RecipesDashboard'; 11import RecipesDashboard from '../../components/settings/recipes/RecipesDashboard';
13import ErrorBoundary from '../../components/util/ErrorBoundary'; 12import ErrorBoundary from '../../components/util/ErrorBoundary';
@@ -33,20 +32,15 @@ export default @inject('stores', 'actions') @observer class RecipesScreen extend
33 autorunDisposer = null; 32 autorunDisposer = null;
34 33
35 componentDidMount() { 34 componentDidMount() {
36 gaPage('Settings/Recipe Dashboard/Featured');
37
38 this.autorunDisposer = autorun(() => { 35 this.autorunDisposer = autorun(() => {
39 const { filter } = this.props.params; 36 const { filter } = this.props.params;
40 const { currentFilter } = this.state; 37 const { currentFilter } = this.state;
41 38
42 if (filter === 'all' && currentFilter !== 'all') { 39 if (filter === 'all' && currentFilter !== 'all') {
43 gaPage('Settings/Recipe Dashboard/All');
44 this.setState({ currentFilter: 'all' }); 40 this.setState({ currentFilter: 'all' });
45 } else if (filter === 'featured' && currentFilter !== 'featured') { 41 } else if (filter === 'featured' && currentFilter !== 'featured') {
46 gaPage('Settings/Recipe Dashboard/Featured');
47 this.setState({ currentFilter: 'featured' }); 42 this.setState({ currentFilter: 'featured' });
48 } else if (filter === 'dev' && currentFilter !== 'dev') { 43 } else if (filter === 'dev' && currentFilter !== 'dev') {
49 gaPage('Settings/Recipe Dashboard/Dev');
50 this.setState({ currentFilter: 'dev' }); 44 this.setState({ currentFilter: 'dev' });
51 } 45 }
52 }); 46 });
diff --git a/src/containers/settings/ServicesScreen.js b/src/containers/settings/ServicesScreen.js
index b70a5506e..a501bf530 100644
--- a/src/containers/settings/ServicesScreen.js
+++ b/src/containers/settings/ServicesScreen.js
@@ -6,16 +6,11 @@ import { RouterStore } from 'mobx-react-router';
6// import RecipePreviewsStore from '../../stores/RecipePreviewsStore'; 6// import RecipePreviewsStore from '../../stores/RecipePreviewsStore';
7import UserStore from '../../stores/UserStore'; 7import UserStore from '../../stores/UserStore';
8import ServiceStore from '../../stores/ServicesStore'; 8import ServiceStore from '../../stores/ServicesStore';
9import { gaPage } from '../../lib/analytics';
10 9
11import ServicesDashboard from '../../components/settings/services/ServicesDashboard'; 10import ServicesDashboard from '../../components/settings/services/ServicesDashboard';
12import ErrorBoundary from '../../components/util/ErrorBoundary'; 11import ErrorBoundary from '../../components/util/ErrorBoundary';
13 12
14export default @inject('stores', 'actions') @observer class ServicesScreen extends Component { 13export default @inject('stores', 'actions') @observer class ServicesScreen extends Component {
15 componentDidMount() {
16 gaPage('Settings/Service Dashboard');
17 }
18
19 componentWillUnmount() { 14 componentWillUnmount() {
20 this.props.actions.service.resetFilter(); 15 this.props.actions.service.resetFilter();
21 this.props.actions.service.resetStatus(); 16 this.props.actions.service.resetStatus();