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

@@ -14,7 +14,6 @@ import NoteItemSimple from 'browser/components/NoteItemSimple'
import searchFromNotes from 'browser/lib/search'
import fs from 'fs'
import path from 'path'
import { history } from 'browser/main/store'
import { push, replace } from 'connected-react-router'
import copy from 'copy-to-clipboard'
import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
@@ -764,10 +763,10 @@ class NoteList extends React.Component {
selectedNoteKeys: [note.key]
})
history.push({
dispatch(push({
pathname: location.pathname,
search: queryString.stringify({key: note.key})
})
}))
})
}
@@ -776,9 +775,7 @@ class NoteList extends React.Component {
return copy(noteLink)
}
// Navigate seems unused
navigate (sender, pathname) {
// const { router } = this.context
const { dispatch } = this.props
dispatch(push({
pathname,
@@ -949,10 +946,10 @@ class NoteList extends React.Component {
type: 'UPDATE_NOTE',
note: note
})
history.push({
dispatch(push({
pathname: location.pathname,
search: queryString.stringify({key: getNoteKey(note)})
})
}))
})
})
})