Team switcher

This commit is contained in:
Tom Moor
2018-11-11 16:24:05 -08:00
parent 10e1f0231c
commit cc9f32cdc9
8 changed files with 107 additions and 26 deletions

View File

@ -13,10 +13,11 @@ import theme from '../../shared/styles/theme';
const sheet = new ServerStyleSheet();
export default function renderpage(ctx: Object, children: React.Node) {
const sessions = JSON.parse(ctx.cookies.get('sessions') || '{}');
const html = ReactDOMServer.renderToString(
<StyleSheetManager sheet={sheet.instance}>
<ThemeProvider theme={theme}>
<Layout>{children}</Layout>
<Layout sessions={sessions}>{children}</Layout>
</ThemeProvider>
</StyleSheetManager>
);