This repository has been archived by the owner. It is now read-only.
Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (15 sloc) 480 Bytes
import React from 'react';
import PropTypes from 'prop-types';
import { StaticRouter } from 'react-router-dom';
import { renderRoutes } from 'react-router-config';
import routes from './routes';
const ServerRouting = ({ url, context }) => (
<StaticRouter location={url} context={context}>
{renderRoutes(routes)}
</StaticRouter>
);
ServerRouting.propTypes = {
url: PropTypes.string.isRequired,
context: PropTypes.object.isRequired,
};
export default ServerRouting;