diff --git a/src/JournalView.tsx b/src/JournalView.tsx index c63d42d..c913587 100644 --- a/src/JournalView.tsx +++ b/src/JournalView.tsx @@ -1,5 +1,7 @@ import * as React from 'react'; import { Route, Redirect } from 'react-router'; +import { Link } from 'react-router-dom'; +import { Tabs, Tab } from 'material-ui/Tabs'; import { EteSyncContextType } from './EteSyncContext'; import * as EteSync from './api/EteSync'; @@ -66,30 +68,48 @@ export class JournalView extends React.Component { return syncEntry; }); + let itemsTitle: string; + let itemsView: JSX.Element; + if (collectionInfo.type === 'CALENDAR') { + itemsView = ; + itemsTitle = 'Events'; + } else if (collectionInfo.type === 'ADDRESS_BOOK') { + itemsView = ; + itemsTitle = 'Contacts'; + } else { + itemsView =
Unsupported type
; + itemsTitle = 'Items'; + } + return (
+ + } + /> + } + /> + } + render={() => } /> -

Welcome to Journal!

+

{collectionInfo.displayName}

- + render={() => { + return ; + } } /> { - if (collectionInfo.type === 'CALENDAR') { - return ; - } else if (collectionInfo.type === 'ADDRESS_BOOK') { - return ; - } else { - return
Unsupported type
; - } + return itemsView; } } />