|
|
@ -1,8 +1,11 @@
|
|
|
|
import * as React from 'react';
|
|
|
|
import * as React from 'react';
|
|
|
|
|
|
|
|
import { Route, Redirect } from 'react-router';
|
|
|
|
|
|
|
|
|
|
|
|
import { EteSyncContextType } from './EteSyncContext';
|
|
|
|
import { EteSyncContextType } from './EteSyncContext';
|
|
|
|
import * as EteSync from './api/EteSync';
|
|
|
|
import * as EteSync from './api/EteSync';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { routeResolver } from './App';
|
|
|
|
|
|
|
|
|
|
|
|
export class JournalView extends React.Component {
|
|
|
|
export class JournalView extends React.Component {
|
|
|
|
static defaultProps = {
|
|
|
|
static defaultProps = {
|
|
|
|
prevUid: null,
|
|
|
|
prevUid: null,
|
|
|
@ -49,9 +52,20 @@ export class JournalView extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<ul>
|
|
|
|
<Route
|
|
|
|
{journals}
|
|
|
|
path={routeResolver.getRoute('journals._id')}
|
|
|
|
</ul>
|
|
|
|
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>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|