fix(client): manually load a fontawesome css for correct SSR
This commit is contained in:
@ -1,6 +1,5 @@
|
|||||||
.footer {
|
.footer {
|
||||||
background-color: #e0e0e0;
|
background-color: #e0e0e0;
|
||||||
color: #555555;
|
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-top: 40px;
|
padding-top: 40px;
|
||||||
|
@ -4,6 +4,7 @@ import { connect } from 'react-redux';
|
|||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import Helmet from 'react-helmet';
|
import Helmet from 'react-helmet';
|
||||||
|
import fontawesome from '@fortawesome/fontawesome';
|
||||||
|
|
||||||
import ga from '../../analytics';
|
import ga from '../../analytics';
|
||||||
import {
|
import {
|
||||||
@ -25,6 +26,10 @@ import './global.css';
|
|||||||
import './layout.css';
|
import './layout.css';
|
||||||
import './night.css';
|
import './night.css';
|
||||||
|
|
||||||
|
fontawesome.config = {
|
||||||
|
autoAddCss: false
|
||||||
|
};
|
||||||
|
|
||||||
const metaKeywords = [
|
const metaKeywords = [
|
||||||
'javascript',
|
'javascript',
|
||||||
'js',
|
'js',
|
||||||
@ -148,7 +153,9 @@ class DefaultLayout extends Component {
|
|||||||
},
|
},
|
||||||
{ name: 'keywords', content: metaKeywords.join(', ') }
|
{ name: 'keywords', content: metaKeywords.join(', ') }
|
||||||
]}
|
]}
|
||||||
/>
|
>
|
||||||
|
<style>{fontawesome.dom.css()}</style>
|
||||||
|
</Helmet>
|
||||||
<Header disableSettings={disableSettings} />
|
<Header disableSettings={disableSettings} />
|
||||||
<div className={`default-layout ${landingPage ? 'landing-page' : ''}`}>
|
<div className={`default-layout ${landingPage ? 'landing-page' : ''}`}>
|
||||||
<OfflineWarning isOnline={isOnline} isSignedIn={isSignedIn} />
|
<OfflineWarning isOnline={isOnline} isSignedIn={isSignedIn} />
|
||||||
@ -157,7 +164,7 @@ class DefaultLayout extends Component {
|
|||||||
) : null}
|
) : null}
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
<Footer/>
|
<Footer />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user