1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

change redirecting to connected-react-router

This commit is contained in:
AWolf81
2019-05-09 07:45:21 +02:00
committed by Junyoung Choi
parent 7e8f46c4f3
commit 3c39dc3cec
6 changed files with 24 additions and 25 deletions

View File

@@ -1,8 +1,8 @@
import { history } from 'browser/main/store'
import dataApi from 'browser/main/lib/dataApi'
import ee from 'browser/main/lib/eventEmitter'
import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
import queryString from 'query-string'
import { push } from 'connected-react-router'
export function createMarkdownNote (storage, folder, dispatch, location, params, config) {
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_MARKDOWN')
@@ -29,10 +29,10 @@ export function createMarkdownNote (storage, folder, dispatch, location, params,
note: note
})
history.push({
dispatch(push({
pathname: location.pathname,
search: queryString.stringify({ key: noteHash })
})
}))
ee.emit('list:jump', noteHash)
ee.emit('detail:focus')
})
@@ -71,10 +71,10 @@ export function createSnippetNote (storage, folder, dispatch, location, params,
type: 'UPDATE_NOTE',
note: note
})
history.push({
dispatch(push({
pathname: location.pathname,
search: queryString.stringify({ key: noteHash })
})
}))
ee.emit('list:jump', noteHash)
ee.emit('detail:focus')
})