updated format and lint scripts and applied them

This commit is contained in:
JJ Kasper
2018-06-01 16:52:12 -05:00
parent 53ac8a6793
commit 017a9993ee
58 changed files with 1711 additions and 1568 deletions

View File

@@ -1,21 +1,21 @@
const freezeSSR = selector => {
const FrozenSSR = () => {
let __html = '';
let props = {};
if(typeof document !== 'undefined') {
let el = document.querySelector(selector);
if(el) {
__html = el.innerHTML;
let __html = ''
let props = {}
if (typeof document !== 'undefined') {
let el = document.querySelector(selector)
if (el) {
__html = el.innerHTML
el.getAttributeNames().forEach(attr => {
const attrKey = attr === 'class' ? 'className' : attr;
props[attrKey] = el.getAttribute(attr);
});
}
const attrKey = attr === 'class' ? 'className' : attr
props[attrKey] = el.getAttribute(attr)
})
}
}
return <div {...props} dangerouslySetInnerHTML={{ __html }} />;
};
return <div {...props} dangerouslySetInnerHTML={{ __html }} />
}
return { loading: FrozenSSR };
};
return { loading: FrozenSSR }
}
export default freezeSSR;
export default freezeSSR