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 AboutPage from 'components/AboutPage';
|
||||||
import LoginPage from 'containers/LoginPage';
|
import LoginPage from 'containers/LoginPage';
|
||||||
import ShowPage from 'containers/ShowPage';
|
import ShowPage from 'containers/ShowPage';
|
||||||
import FourOhFourPage from 'components/FourOhFourPage';
|
import FourOhFourPage from 'containers/FourOhFourPage';
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
return (
|
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 React from 'react';
|
||||||
import NavBar from 'containers/NavBar';
|
import NavBar from 'containers/NavBar/index';
|
||||||
import Helmet from 'react-helmet';
|
import Helmet from 'react-helmet';
|
||||||
const { details: { title, host } } = require('../../../config/siteConfig.js');
|
|
||||||
|
|
||||||
class FourOhForPage extends React.Component {
|
class FourOhForPage extends React.Component {
|
||||||
render () {
|
render () {
|
||||||
|
const {title, host} = this.props;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Helmet>
|
<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 = {
|
const initialState = {
|
||||||
host,
|
host,
|
||||||
|
title,
|
||||||
defaults: {
|
defaults: {
|
||||||
defaultThumbnail,
|
defaultThumbnail,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue