diff --git a/src/App.tsx b/src/App.tsx index 7f30552..703cc18 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -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', diff --git a/src/Main.tsx b/src/Main.tsx index 67035e8..fa879e0 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -15,6 +15,7 @@ class Main extends React.Component { etesync: CredentialsData; journals: JournalsData; entries: EntriesType; + match: any; }; constructor(props: any) { diff --git a/src/SyncGate.tsx b/src/SyncGate.tsx index 7b399a6..f5cb5a1 100644 --- a/src/SyncGate.tsx +++ b/src/SyncGate.tsx @@ -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 { ( -
- ) - } + render={({match}) => ( + + )} + /> + ( +
+ )} />