import * as React from "react";
import { Route, Redirect } from "react-router";

export const ForceTrailingSlashes: React.SFC<{}> = ({ }) => {
    return <Route path="/:url*" exact strict render={(props) => {
        const new_loc = { ...props.location, pathname: props.location.pathname + '/' }
        return <Redirect to={new_loc} />
    }} />
}
