import React from 'react'; import { Route, Redirect } from 'react-router-dom'; const RedirectWithStatus = ({ key, from, to, status }) => ( { // there is no `staticContext` on the client, so // we need to guard against that here if (staticContext) staticContext.status = status return }} /> ) export default RedirectWithStatus;