Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function Breadcrumbs() {
var links = useBreadcrumbs(),
classes = useStyles(),
{ ButtonLink } = useComponents();
if (!links) {
links = [{ url: '/', label: 'Home', active: true }];
}
links[0].label = ;
// FIXME: NavLink should already be able to detect current page
links[links.length - 1].active = true;
return (
}>
{links.map(({ url, label, active }, i) => (
export default function Header() {
const title = useTitle(),
{ Breadcrumbs } = useComponents();
return (
<>
{title}
);
}
export default function AutoMap() {
const state = useMapState(),
{
Map,
AutoBasemap,
AutoOverlay,
Legend,
BasemapToggle,
OverlayToggle
} = useComponents(),
{ Highlight } = useOverlayComponents();
if (!state) {
return null;
}
const { basemaps, overlays, bounds, mapProps, highlight } = state;
return (
<map>
<legend>
{basemaps.map((conf, i) => (
</legend></map>
export default function List() {
const reverse = useReverse(),
{ list } = useRenderContext(),
{ page } = useRouteInfo(),
{ ListItemLink, Pagination } = useComponents();
return (
<div>
{list.map(row => (
{row.label}
))}
</div>
);
export default function Detail() {
const reverse = useReverse(),
{ page, item_id } = useRouteInfo(),
{ Link } = useComponents();
return (
<div>
Edit
</div>
);
}
export default function Index() {
const reverse = useReverse(),
{ pages } = useRenderContext(),
{ ListItemLink } = useComponents();
return (
<div>
{pages && (
{pages.map(page => (
{page.name}
{page.list && ' list'}</div>