moved title and host to state from FourOhFour

This commit is contained in:
bill bittner 2018-03-15 10:54:41 -07:00
parent 835e30bff4
commit 7238448a90
4 changed files with 21 additions and 4 deletions

View file

@ -4,7 +4,7 @@ import HomePage from 'components/HomePage';
import AboutPage from 'components/AboutPage';
import LoginPage from 'containers/LoginPage';
import ShowPage from 'containers/ShowPage';
import FourOhFourPage from 'components/FourOhFourPage';
import FourOhFourPage from 'containers/FourOhFourPage';
const App = () => {
return (

View file

@ -0,0 +1,11 @@
import { connect } from 'react-redux';
import View from './view';
const mapStateToProps = ({ site: { host, title } }) => {
return {
host,
title,
};
};
export default connect(mapStateToProps, null)(View);

View file

@ -1,10 +1,10 @@
import React from 'react';
import NavBar from 'containers/NavBar';
import NavBar from 'containers/NavBar/index';
import Helmet from 'react-helmet';
const { details: { title, host } } = require('../../../config/siteConfig.js');
class FourOhForPage extends React.Component {
render () {
const {title, host} = this.props;
return (
<div>
<Helmet>

View file

@ -1,7 +1,13 @@
const { details: { host }, assetDefaults: { thumbnail: defaultThumbnail } } = require('../../config/siteConfig.js');
const siteConfig = require('../../config/siteConfig.js');
const {
details: { title, host },
assetDefaults: { thumbnail: defaultThumbnail },
} = siteConfig;
const initialState = {
host,
title,
defaults: {
defaultThumbnail,
},