Working on 'static' pages

This commit is contained in:
Tom Moor
2017-10-22 16:33:10 -07:00
parent 4d53c4aa00
commit aceaf261d2
10 changed files with 249 additions and 76 deletions

View File

@@ -1,7 +1,7 @@
// @flow
import React from 'react';
import { withRouter } from 'react-router-dom';
import Helmet from 'react-helmet';
import { Helmet } from 'react-helmet';
import styled from 'styled-components';
import { observer, inject } from 'mobx-react';
import keydown from 'react-keydown';
@@ -99,18 +99,15 @@ type Props = {
return (
<Container column auto>
<Helmet
title="Atlas"
meta={[
{
name: 'viewport',
content: 'width=device-width, initial-scale=1.0',
},
]}
/>
<Helmet>
<title>Atlas</title>
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
</Helmet>
{this.props.ui.progressBarVisible && <LoadingIndicatorBar />}
{this.props.notifications}
<Flex auto>

View File

@@ -1,11 +1,13 @@
// @flow
import React from 'react';
import Helmet from 'react-helmet';
import { Helmet } from 'react-helmet';
type Props = {
title: string,
};
const PageTitle = ({ title }: Props) => <Helmet title={`${title} - Atlas`} />;
const PageTitle = ({ title }: Props) => (
<Helmet><title>{`${title} - Atlas`}</title></Helmet>
);
export default PageTitle;

View File

@@ -4,8 +4,8 @@ import { observer, inject } from 'mobx-react';
import AuthStore from 'stores/AuthStore';
type Props = {
children: React.Element<any>,
scopes?: Array<string>,
children: React$Element<*>,
scopes?: string[],
auth: AuthStore,
redirectUri: string,
};
@@ -32,9 +32,7 @@ type Props = {
};
const urlParams = Object.keys(params)
.map(key => {
return `${key}=${encodeURIComponent(params[key])}`;
})
.map(key => `${key}=${encodeURIComponent(params[key])}`)
.join('&');
return `${baseUrl}?${urlParams}`;