fix(client): manually load a fontawesome css for correct SSR
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
.footer {
|
||||
background-color: #e0e0e0;
|
||||
color: #555555;
|
||||
font-size: 0.9em;
|
||||
width: 100%;
|
||||
padding-top: 40px;
|
||||
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user