Added Application.js wrapper and viewport meta tag
This commit is contained in:
@@ -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
22
src/scenes/Application.js
Normal 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;
|
||||
Reference in New Issue
Block a user