Added Application.js wrapper and viewport meta tag

This commit is contained in:
Jori Lallo
2016-05-24 00:11:34 -07:00
parent 4e92803917
commit 43dc5c1067
3 changed files with 54 additions and 30 deletions

View File

@@ -20,6 +20,8 @@ import 'utils/base-styles.scss';
import 'fonts/atlas/atlas.css';
import 'assets/styles/github-gist.scss';
import Application from 'scenes/Application';
import Home from 'scenes/Home';
import Editor from 'scenes/Editor';
import Dashboard from 'scenes/Dashboard';
@@ -54,7 +56,7 @@ persistStore(store, {
render((
<Provider store={store}>
<Router history={History}>
<Route path="/">
<Route path="/" component={ Application }>
<IndexRoute component={Home} />
<Route path="/dashboard" component={ Dashboard } onEnter={ requireAuth } />

22
src/scenes/Application.js Normal file
View File

@@ -0,0 +1,22 @@
import React from "react";
import Helmet from "react-helmet";
const Application = (props) => {
return (
<div style={{ width: '100%' }}>
<Helmet
title="Beautiful Atlas"
meta={[
{"name": "viewport", "content": "width=device-width, initial-scale=1.0"},
]}
/>
{ props.children }
</div>
);
};
Application.propTypes = {
children: React.PropTypes.node.isRequired,
}
export default Application;