-
+
diff --git a/src/components/list.js b/src/components/list.js
index 8a046e2..03c969b 100644
--- a/src/components/list.js
+++ b/src/components/list.js
@@ -1,16 +1,19 @@
import React from 'react'
import PropTypes from 'prop-types'
-import { ChapterButton, NoteButton } from './button'
+import { ChapterButton, NoteButton, TagButton } from './button'
-export const DocumentList = ({notes, chapters, currentDocument, onDocumentClick, docType}) =>
+export const DocumentList = ({docs, currentDocument, onDocumentClick, docType}) =>
- {(docType === 'chapters' && chapters.length > 0) &&
-
+ {(docType === 'chapters' && docs.length > 0) &&
+
}
- {(docType === 'notes' && notes.length > 0) &&
-
+ {(docType === 'notes' && docs.length > 0) &&
+
}
+ {(docType === 'tags' && docs.length > 0) &&
+
+ }
export const ChapterList = ({chapters, currentChapter, onChapterClick}) =>
@@ -27,6 +30,13 @@ export const NoteList = ({notes, currentNote, onNoteClick}) =>
)}
+export const TagList = ({tags, currentTag, onTagClick}) =>
+
+ {tags.map(tag =>
+ onTagClick(tag.id, 'tags')} />
+ )}
+
+
DocumentList.propTypes = {
notes: PropTypes.arrayOf(PropTypes.object),
chapters: PropTypes.arrayOf(PropTypes.object),
diff --git a/src/containers/editorSidebarContainer.js b/src/containers/editorSidebarContainer.js
index 9921ed3..fe89579 100644
--- a/src/containers/editorSidebarContainer.js
+++ b/src/containers/editorSidebarContainer.js
@@ -1,18 +1,20 @@
import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
+import { push } from 'react-router-redux'
import actions from '../actions'
import { DocumentList } from '../components/list'
import { NewDocumentButton } from '../components/button'
import { DocTypeDropdown } from '../components/dropdown'
import SidebarSpacer from '../components/sidebarSpacer'
-import { push } from 'react-router-redux'
+import helpers from '../modules/helpers'
const EditorSidebar = ({
chapters,
notes,
- currentDocument,
+ tags,
docType,
+ currentDocument,
onDocumentClick,
onNewDocumentClick,
setDocType,
@@ -23,7 +25,7 @@ const EditorSidebar = ({
onNewDocumentClick(docType)} docType={docType}/>
-
+