@@ -9,29 +9,29 @@ import { isLast } from '../lib/lib';
9function Crumbs(props) {
9function Crumbs(props) {
10 const history = useHistory();
10 const history = useHistory();
12− // FIXME probably more straightforward to render them normally and just
12+ return (
13− // return the reversed array of renders
13+ <>
14− const rendered = history.routes.map((route, idx) => {
14+ {history.routes.map((route, idx) => {
16− <div className={'flex items-center'} key={`history-${idx}`}>
16+ <div key={`history-${idx}`} className={'flex items-center'}>
18− prop-type={'link'}
18+ prop-type={'link'}
19− prop-size={'sm'}
19+ prop-size={'sm'}
20− key={`history-button-${idx}`}
20+ key={`history-button-${idx}`}
21− onClick={() => history.pop(history.size - idx - 1)}>
21+ onClick={() => history.pop(history.size - idx - 1)}>
22− {getRouteBreadcrumb(props, route)}
22+ {getRouteBreadcrumb(props, route)}
23− </Button>
23+ </Button>
25− {isLast(history.size, idx) ? (
25+ {isLast(history.size, idx) ? (
28− <Chevron className={'h-4 mh-2'} />
28+ <Chevron className={'h-4 mh-2'} />
34− return rendered;
34+ );
37function Header(props) {
37function Header(props) {