1import React from 'react'
2import {JssProvider, SheetsRegistry} from 'react-jss'
4const globalLeak = new Map();
6export const wrapRootElement = ({ element, pathname }) => {
7 const sheets = new SheetsRegistry()
8 globalLeak.set(pathname, sheets);
10 return <JssProvider registry={sheets}>{element}</JssProvider>
13export const onRenderBody = (
14 { setHeadComponents, pathname },
16 const sheets = globalLeak.get(pathname);
22 const css = sheets.toString();
24 // css = disableAutoprefixing ? css : autoprefixer(css, pathname);
25 // css = disableMinification ? css : cleanCSS.minify(css).styles;
31 dangerouslySetInnerHTML={{ __html: css }}
35 globalLeak.delete(pathname);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list