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({
home: '',
pim: {
contacts: 'contacts/:contactUid',
events: 'events/:contactUid',
},
journals: {
_id: {
_base: ':journalUid',

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

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

Loading…
Cancel
Save