update meta

main
raboid 6 years ago committed by Michael Fix
parent 5addb18bb7
commit 40ba1e0f9e

@ -68,15 +68,13 @@ export const MetaTags = () => (
* Before supporting <link rel="preload"> verify that it is widely supported in FireFox
* with out a flag here: https://caniuse.com/#feat=link-rel-preload
*/
export default function Meta() {
export const MetaLinks = () => {
const onBrowser = typeof window !== 'undefined'
return (
<div className="meta">
<React.Fragment>
<Head>
<title>Carbon</title>
<link rel="stylesheet" href="/static/react-crop.css" />
</Head>
<MetaTags />
<StylesheetLink theme="seti" />
<CodeMirrorLink />
{LOCAL_STYLESHEETS.map(id => (
@ -85,16 +83,23 @@ export default function Meta() {
{onBrowser
? CDN_STYLESHEETS.map(theme => <StylesheetLink key={theme.id} theme={theme.id} />)
: null}
<Reset />
<Font />
<Typography />
<style jsx>
{`
.meta {
display: none;
}
`}
</style>
</div>
</React.Fragment>
)
}
export const Styles = () => (
<React.Fragment>
<Reset />
<Font />
<Typography />
</React.Fragment>
)
export default function Meta() {
return (
<React.Fragment>
<MetaTags />
<Styles />
</React.Fragment>
)
}

@ -5,6 +5,7 @@ import { withRouter } from 'next/router'
// Ours
import Editor from '../components/Editor'
import Page from '../components/Page'
import { MetaLinks } from '../components/Meta'
import api from '../lib/api'
import { updateQueryString } from '../lib/routing'
import { saveSettings, clearSettings, omit } from '../lib/util'
@ -23,6 +24,7 @@ class Index extends React.Component {
render() {
return (
<Page enableHeroText={true}>
<MetaLinks />
<Editor
router={this.props.router}
onUpdate={this.onEditorUpdate}

Loading…
Cancel
Save