From 25bf249d9f88bdaf8d84ed2f99c855caaabcedcf Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Fri, 1 Dec 2017 18:15:08 +0000 Subject: [PATCH] Improve journal page. --- src/App.tsx | 6 ++++++ src/JournalView.tsx | 20 +++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 65d3793..d16e502 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -11,6 +11,12 @@ export const routeResolver = new RouteResolver({ _base: 'journals', _id: { _base: ':journalUid', + entries: { + _base: 'entries', + _id: { + _base: ':entryUid', + }, + }, }, }, }); diff --git a/src/JournalView.tsx b/src/JournalView.tsx index 4aaf58b..e21af54 100644 --- a/src/JournalView.tsx +++ b/src/JournalView.tsx @@ -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 (
- + } + /> +

Welcome to Journal!

+ +
    + {journals} +
+ } + />
); }