feat: Include more events in document history sidebar (#2334)

closes #2230
This commit is contained in:
Tom Moor
2021-08-05 18:03:55 -04:00
committed by GitHub
parent 57a2524fbd
commit 9db72217af
22 changed files with 600 additions and 369 deletions

26
app/components/NavLink.js Normal file
View File

@ -0,0 +1,26 @@
// @flow
import * as React from "react";
import { NavLink, Route, type Match } from "react-router-dom";
type Props = {
children?: (match: Match) => React.Node,
exact?: boolean,
to: string,
};
export default function NavLinkWithChildrenFunc({
to,
exact = false,
children,
...rest
}: Props) {
return (
<Route path={to} exact={exact}>
{({ match }) => (
<NavLink {...rest} to={to} exact={exact}>
{children ? children(match) : null}
</NavLink>
)}
</Route>
);
}