diff --git a/src/components/SourceOverlay.jsx b/src/components/SourceOverlay.jsx
index d18a865..ea94e2d 100644
--- a/src/components/SourceOverlay.jsx
+++ b/src/components/SourceOverlay.jsx
@@ -19,7 +19,7 @@ function SourceOverlay ({ source, onCancel }) {
}
+ loader={
{img ? img : ''}
- {vid ? `, ${vid}`: ''}
- {txt ? `, ${txt}`: ''}
+ {(img && vid) ? `, ${vid}`: (vid || '')}
+ {((img || vid) && txt) ? `, ${txt}`: (txt || '')}
)
}
@@ -145,6 +145,7 @@ function SourceOverlay ({ source, onCancel }) {
{title?
{title}
: null}
{_renderCounts(counts)}
+
{type ?
Media type
: null}
{type ?
perm_media{type}
: null}
{date ?
Date
: null}
diff --git a/src/components/TagListPanel.jsx b/src/components/TagListPanel.jsx
index fa6667b..1ca46e7 100644
--- a/src/components/TagListPanel.jsx
+++ b/src/components/TagListPanel.jsx
@@ -22,7 +22,7 @@ class TagListPanel extends React.Component {
onClickCheckbox(tag) {
tag.active = !tag.active
- this.props.filter(tag);
+ this.props.onFilter(tag);
}
createNodeComponent (node, depth) {
diff --git a/src/components/Toolbar.jsx b/src/components/Toolbar.jsx
index ea526f9..53b0808 100644
--- a/src/components/Toolbar.jsx
+++ b/src/components/Toolbar.jsx
@@ -81,7 +81,7 @@ class Toolbar extends React.Component {
categories={this.props.categories}
tagFilters={this.props.tagFilters}
categoryFilters={this.props.categoryFilters}
- filter={this.props.filter}
+ onFilter={this.props.methods.onFilter}
language={this.props.language}
/>
@@ -90,13 +90,13 @@ class Toolbar extends React.Component {
return '';
}
- renderToolbarTab(_selected, label) {
+ renderToolbarTab(_selected, label, icon_key) {
const isActive = (this.state._selected === _selected);
let classes = (isActive) ? 'toolbar-tab active' : 'toolbar-tab';
return (
{ this.selectTab(_selected); }}>
-
timeline
+
{icon_key}
{label}
);
@@ -104,7 +104,7 @@ class Toolbar extends React.Component {
renderToolbarTabs() {
const title = copy[this.props.language].toolbar.title;
- const isTags = this.props.tags && (this.props.tags.children > 0);
+ const isTags = this.props.tags && (Object.keys(this.props.tags.children) > 0);
return (
@@ -125,7 +125,7 @@ class Toolbar extends React.Component {
{this.renderClosePanel()}
{this.renderToolbarNarrativePanel()}
- {/* {this.renderToolbarTagPanel()} */}
+ {this.renderToolbarTagPanel()}}
)
@@ -150,15 +150,15 @@ class Toolbar extends React.Component {
renderToolbarTabs() {
const title = copy[this.props.language].toolbar.title;
- const isTags = this.props.tags && (this.props.tags.children > 0);
+ const isTags = this.props.tags && this.props.tags.children;
return (
{/*this.renderToolbarTab(0, 'search')*/}
- {this.renderToolbarTab(0, 'Narratives')}
- {(isTags) ? this.renderToolbarTab(1, 'Explore by tag') : ''}
+ {this.renderToolbarTab(0, 'Narratives', 'timeline')}
+ {(isTags) ? this.renderToolbarTab(1, 'Explore by tag', 'style') : ''}
state.app.filters.timerange
*/
function isTaggedIn(event, tagFilters) {
if (event.tags) {
- const tagsInEvent = event.tags.split(",")
- const isTagged = tagsInEvent.some((tag) => {
+ const isTagged = event.tags.some((tag) => {
return tagFilters.find(tF => (tF.key === tag && tF.active))
})
return isTagged