Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
match({ routes, history }, (error, redirectLocation, renderProps) => {
if (error) {
// response.status(500).send(error.message);
} else if (redirectLocation) {
// response.redirect(302, `${redirectLocation.pathname}${redirectLocation.search}`);
} else if (renderProps) {
response(template({
root: renderToString(),
css: new cleancss().minify(jss.sheets.toString()).styles,
jsBundle: clientAssets.main.js
}));
} else {
// response.status(404).send('Not found');
}
});
}