moved title and host to state from FourOhFour
This commit is contained in:
parent
835e30bff4
commit
7238448a90
4 changed files with 21 additions and 4 deletions
|
@ -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 (
|
||||
|
|
11
react/containers/FourOhFourPage/index.jsx
Normal file
11
react/containers/FourOhFourPage/index.jsx
Normal 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);
|
|
@ -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>
|
|
@ -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,
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue