* added font awesome * replaced GitHub logo in Footer.tsx with one provided by FontAwesome * added loader, when userStore fetching data from server * allow circular dependencies, since this is no problem * fix default (e.g. prod) profile * fix a problem, when no authenticated person calls /api/v1/user/current endpoint
17 lines
558 B
TypeScript
17 lines
558 B
TypeScript
import {browserHistory, createRouterState, HistoryAdapter, RouterStore} from "mobx-state-router";
|
|
import {RootStore} from "./RootStore";
|
|
import {routes} from "../router/routes";
|
|
|
|
export class MyRouterStore extends RouterStore {
|
|
constructor(rootStore: RootStore) {
|
|
super(routes,
|
|
createRouterState('error', {notFound: true}),
|
|
{rootStore: rootStore});
|
|
}
|
|
|
|
init() {
|
|
const historyAdapter = new HistoryAdapter(this, browserHistory);
|
|
historyAdapter.observeRouterStateChanges();
|
|
return this;
|
|
}
|
|
} |