fix: Regression with upgrade to styled-components@5 – new ServerStyleSheet needed per render
This commit is contained in:
parent
0c254285a1
commit
1b25d12e2e
|
@ -10,8 +10,6 @@ import {
|
||||||
import Layout from '../pages/components/Layout';
|
import Layout from '../pages/components/Layout';
|
||||||
import { light } from '../../shared/styles/theme';
|
import { light } from '../../shared/styles/theme';
|
||||||
|
|
||||||
const sheet = new ServerStyleSheet();
|
|
||||||
|
|
||||||
export default function renderpage(ctx: Object, children: React.Node) {
|
export default function renderpage(ctx: Object, children: React.Node) {
|
||||||
let sessions = {};
|
let sessions = {};
|
||||||
try {
|
try {
|
||||||
|
@ -22,6 +20,7 @@ export default function renderpage(ctx: Object, children: React.Node) {
|
||||||
console.error(`Sessions cookie could not be parsed: ${err}`);
|
console.error(`Sessions cookie could not be parsed: ${err}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const sheet = new ServerStyleSheet();
|
||||||
const loggedIn = !!(
|
const loggedIn = !!(
|
||||||
ctx.cookies.get('accessToken') || Object.keys(sessions).length
|
ctx.cookies.get('accessToken') || Object.keys(sessions).length
|
||||||
);
|
);
|
||||||
|
|
Reference in New Issue