|
|
|
@ -1,8 +1,11 @@
|
|
|
|
|
import * as React from 'react';
|
|
|
|
|
import { Route, Redirect } from 'react-router';
|
|
|
|
|
|
|
|
|
|
import { EteSyncContextType } from './EteSyncContext';
|
|
|
|
|
import * as EteSync from './api/EteSync';
|
|
|
|
|
|
|
|
|
|
import { routeResolver } from './App';
|
|
|
|
|
|
|
|
|
|
export class JournalView extends React.Component {
|
|
|
|
|
static defaultProps = {
|
|
|
|
|
prevUid: null,
|
|
|
|
@ -49,9 +52,20 @@ export class JournalView extends React.Component {
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<Route
|
|
|
|
|
path={routeResolver.getRoute('journals._id')}
|
|
|
|
|
exact={true}
|
|
|
|
|
render={() => <Redirect to={routeResolver.getRoute('journals._id.entries', {journalUid: journal})} />}
|
|
|
|
|
/>
|
|
|
|
|
<h2>Welcome to Journal!</h2>
|
|
|
|
|
<Route
|
|
|
|
|
path={routeResolver.getRoute('journals._id.entries')}
|
|
|
|
|
render={() =>
|
|
|
|
|
<ul>
|
|
|
|
|
{journals}
|
|
|
|
|
</ul>
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|