import Link from 'next/link';
import {
arrayOf,
bool,
element,
string
} from 'prop-types';
export const Crumb = ({ title, href, last }) => {
let content = null;
if (last) {
content = (
{ title }
);
} else {
content = (
{ title }
);
}
return (
{ content }
{
!last && { `<` }
}
)
};
Crumb.propTypes = {
title: string.isRequired,
href: string.isRequired,
last: bool
};
Crumb.defaultProps = {
last: false
};
export const Breadcrumbs = ({ children }) => (
{ children }
);
Breadcrumbs.propTypes = {
children: arrayOf(element)
};