1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

config to use dynamic customEvents

This commit is contained in:
Sosuke Suzuki
2017-05-31 22:41:22 +09:00
parent 2fea9eb874
commit 186a815821
7 changed files with 20 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ import context from 'browser/lib/context'
import ConfigManager from 'browser/main/lib/ConfigManager'
import _ from 'lodash'
import { findNoteTitle } from 'browser/lib/findNoteTitle'
import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
function pass (name) {
switch (name) {
@@ -110,6 +111,7 @@ class SnippetNoteDetail extends React.Component {
type: 'UPDATE_NOTE',
note: note
})
AwsMobileAnalyticsConfig.recordDynamitCustomEvent('EDIT_NOTE')
})
}
@@ -148,6 +150,7 @@ class SnippetNoteDetail extends React.Component {
handleStarButtonClick (e) {
let { note } = this.state
if (!note.isStarred) AwsMobileAnalyticsConfig.recordDynamitCustomEvent('ADD_STAR')
note.isStarred = !note.isStarred