From dc1dece1d9faefd353850f5f5992172581dc6386 Mon Sep 17 00:00:00 2001 From: Franc Camps-Febrer Date: Mon, 10 Dec 2018 16:12:18 +0100 Subject: [PATCH] Fix some rebasing conflicts --- src/actions/index.js | 18 +----------------- src/components/Toolbar.jsx | 11 +++++++---- src/components/presentational/CardCategory.js | 2 +- src/store/initial.js | 4 ++-- webpack.config.js | 2 +- 5 files changed, 12 insertions(+), 25 deletions(-) diff --git a/src/actions/index.js b/src/actions/index.js index 06c7f68..99f65e0 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -66,7 +66,7 @@ export function fetchDomain () { let tagsPromise if (process.env.features.USE_TAGS) { - tagsPromise = fetch(TAG_TREE_URL) + tagsPromise = fetch(TAG_URL) .then(response => response.json()) .catch(handleError('tags')) } @@ -164,14 +164,6 @@ export function updateTagFilters(tag) { } } -export const UPDATE_NARRATIVE = 'UPDATE_NARRATIVE'; - export function updateNarrative(narrative) { - return { - type: UPDATE_NARRATIVE, - narrative - } - } - export const UPDATE_TIMERANGE = 'UPDATE_TIMERANGE'; export function updateTimeRange(timerange) { return { @@ -264,11 +256,3 @@ export function fetchSourceError(msg) { msg } } - -export const TOGGLE_MAPVIEW = 'TOGGLE_MAPVIEW'; -export function toggleMapView(layer) { - return { - type: TOGGLE_MAPVIEW, - layer - } -} diff --git a/src/components/Toolbar.jsx b/src/components/Toolbar.jsx index bf31a9b..70fcabc 100644 --- a/src/components/Toolbar.jsx +++ b/src/components/Toolbar.jsx @@ -156,16 +156,19 @@ class Toolbar extends React.Component { renderToolbarTabs() { const title = copy[this.props.language].toolbar.title; + const isTags = this.props.tags && (this.props.tags.children > 0); + return (

{title}

{/*this.renderToolbarTab(0, 'search')*/} - {(this.props.isModeGuided) - ? this.renderToolbarNavs() - : this.renderToolbarTagRoot()} + {this.renderToolbarTab(0, 'Narratives')} + {(isTags) ? this.renderToolbarTab(1, 'Explore by tag') : ''}
- {/* {this.renderBottomActions()} */} +
) } diff --git a/src/components/presentational/CardCategory.js b/src/components/presentational/CardCategory.js index fd9691b..20b396d 100644 --- a/src/components/presentational/CardCategory.js +++ b/src/components/presentational/CardCategory.js @@ -1,6 +1,6 @@ import React from 'react'; -import { capitalizeFirstLetter } from '../../js/data/utilities.js'; +import { capitalizeFirstLetter } from '../../js/utilities.js'; const CardCategory = ({ categoryTitle, categoryLabel, color }) => (
diff --git a/src/store/initial.js b/src/store/initial.js index c387910..d487022 100644 --- a/src/store/initial.js +++ b/src/store/initial.js @@ -106,8 +106,8 @@ const initial = { categories: { default: 'red', // Add here other categories to differentiate by color, like: - alpha: '#c73e1d', - beta: '#f40000', + alpha: '#00ff00', + beta: '#ff0000', other: '#f3de2c' }, diff --git a/webpack.config.js b/webpack.config.js index ba1c538..4706f03 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,7 +1,7 @@ const webpack = require('webpack'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); -const userConfig = require('./dev.config'); +const userConfig = require('./config'); const userConfigJSON = {}; const devMode = process.env.NODE_ENV !== 'production';