fix(client): manually load a fontawesome css for correct SSR

This commit is contained in:
Valeriy S
2019-01-24 20:33:13 +03:00
committed by Stuart Taylor
parent 8a70f14319
commit 4b5f9594f6
2 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,5 @@
.footer {
background-color: #e0e0e0;
color: #555555;
font-size: 0.9em;
width: 100%;
padding-top: 40px;

View File

@ -4,6 +4,7 @@ import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { createSelector } from 'reselect';
import Helmet from 'react-helmet';
import fontawesome from '@fortawesome/fontawesome';
import ga from '../../analytics';
import {
@ -25,6 +26,10 @@ import './global.css';
import './layout.css';
import './night.css';
fontawesome.config = {
autoAddCss: false
};
const metaKeywords = [
'javascript',
'js',
@ -148,7 +153,9 @@ class DefaultLayout extends Component {
},
{ name: 'keywords', content: metaKeywords.join(', ') }
]}
/>
>
<style>{fontawesome.dom.css()}</style>
</Helmet>
<Header disableSettings={disableSettings} />
<div className={`default-layout ${landingPage ? 'landing-page' : ''}`}>
<OfflineWarning isOnline={isOnline} isSignedIn={isSignedIn} />
@ -157,7 +164,7 @@ class DefaultLayout extends Component {
) : null}
{children}
</div>
<Footer/>
<Footer />
</Fragment>
);
}