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

Update dependencies & change to React-router v5

This commit is contained in:
AWolf81
2019-05-03 23:53:00 +02:00
committed by Junyoung Choi
parent 76335f78ac
commit b6212f4bfe
29 changed files with 668 additions and 271 deletions

View File

@@ -1,5 +1,5 @@
import CSSModules from 'react-css-modules'
export default function (component, styles) {
return CSSModules(component, styles, {errorWhenNotFound: false})
return CSSModules(component, styles, {handleNotFoundStyleName: 'log'})
}

View File

@@ -1,7 +1,9 @@
import { hashHistory } from 'react-router'
// import { hashHistory } from 'react-router'
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'
export function createMarkdownNote (storage, folder, dispatch, location, params, config) {
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_MARKDOWN')
@@ -28,9 +30,9 @@ export function createMarkdownNote (storage, folder, dispatch, location, params,
note: note
})
hashHistory.push({
history.push({
pathname: location.pathname,
query: { key: noteHash }
search: queryString.stringify({ key: noteHash })
})
ee.emit('list:jump', noteHash)
ee.emit('detail:focus')
@@ -70,9 +72,9 @@ export function createSnippetNote (storage, folder, dispatch, location, params,
type: 'UPDATE_NOTE',
note: note
})
hashHistory.push({
history.push({
pathname: location.pathname,
query: { key: noteHash }
search: queryString.stringify({ key: noteHash })
})
ee.emit('list:jump', noteHash)
ee.emit('detail:focus')