Commit 57e9c05a authored by Viacheslav Pavlov's avatar Viacheslav Pavlov

fixed upgrading of react-jss

parent d9143fb5
......@@ -17,8 +17,7 @@ import languages from 'data/Languages';
// import { create as createJss } from 'jss';
// import jssPreset from 'jss-preset-default';
import { JssProvider, SheetsRegistry } from 'react-jss';
import createGenerateClassName from '@material-ui/core/styles/createGenerateClassName';
import { createGenerateId, JssProvider, SheetsRegistry } from 'react-jss';
import { MuiThemeProvider } from '@material-ui/core/styles';
import theme from 'ui/theme';
......@@ -73,7 +72,7 @@ const prerenderer = (html, errHtml) => (req, res) => {
function renderView() {
// const jss = createJss(jssPreset());
const sheets = new SheetsRegistry();
const generateClassName = createGenerateClassName();
const generateClassName = createGenerateId();
const initialLanguage = req.i18n.language;
const initialI18nStore = {};
const defaultLanguage = 'en';
......@@ -93,7 +92,7 @@ const prerenderer = (html, errHtml) => (req, res) => {
const InitialView = (
<Loadable.Capture report={ (moduleName) => modules.push(moduleName) }>
<ReduxProvider store={ store }>
<JssProvider generateClassName={ generateClassName } registry={ sheets }>
<JssProvider generateId={ generateClassName } registry={ sheets }>
<MuiThemeProvider theme={ theme(direction) } sheetsManager={ new Map() }>
<I18nextProvider i18n={ req.i18n }>
<StaticRouter location={ pathWithoutLang } context={ context } basename={ basename }>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment