Move the main page under pim and redirect there.

master
Tom Hacohen 7 years ago
parent 590e8c61a9
commit c10a4cc924

@ -40,6 +40,10 @@ export function getPalette(part: string): string {
export const routeResolver = new RouteResolver({ export const routeResolver = new RouteResolver({
home: '', home: '',
pim: {
contacts: 'contacts/:contactUid',
events: 'events/:contactUid',
},
journals: { journals: {
_id: { _id: {
_base: ':journalUid', _base: ':journalUid',

@ -15,6 +15,7 @@ class Main extends React.Component {
etesync: CredentialsData; etesync: CredentialsData;
journals: JournalsData; journals: JournalsData;
entries: EntriesType; entries: EntriesType;
match: any;
}; };
constructor(props: any) { constructor(props: any) {

@ -1,6 +1,6 @@
import * as React from 'react'; import * as React from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Route, Switch, withRouter } from 'react-router'; import { Route, Switch, Redirect, withRouter } from 'react-router';
import { routeResolver } from './App'; import { routeResolver } from './App';
@ -62,10 +62,15 @@ class SyncGate extends React.Component {
<Route <Route
path={routeResolver.getRoute('home')} path={routeResolver.getRoute('home')}
exact={true} exact={true}
render={() => ( render={({match}) => (
<Main etesync={this.props.etesync} journals={journals} entries={this.props.entries} /> <Redirect to={routeResolver.getRoute('pim')} />
) )}
} />
<Route
path={routeResolver.getRoute('pim')}
render={({match}) => (
<Main etesync={this.props.etesync} journals={journals} entries={this.props.entries} match={match} />
)}
/> />
<Route <Route
path={routeResolver.getRoute('journals._id')} path={routeResolver.getRoute('journals._id')}

Loading…
Cancel
Save