mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-19 14:31:57 +08:00
15 lines
362 B
TypeScript
15 lines
362 B
TypeScript
import { History } from 'history'
|
|
import { RouterStore as BaseRouterStore, syncHistoryWithStore } from 'mobx-react-router'
|
|
|
|
export class RouterStore extends BaseRouterStore {
|
|
constructor (history?: History) {
|
|
super()
|
|
|
|
if (history) {
|
|
this.history = syncHistoryWithStore(history, this)
|
|
}
|
|
}
|
|
}
|
|
|
|
export default RouterStore
|