import Link from 'next/link' import { ParsedUrlQuery } from 'querystring' import { FunctionComponent } from 'react' const Breadcrumb: FunctionComponent<{ query?: ParsedUrlQuery }> = ({ query }) => { if (query) { const { path } = query if (Array.isArray(path)) { return (
🚩 Home
{path.map((q: string, i: number) => (
/
encodeURIComponent(p)) .join('/')}`} > {q}
))}
) } } return (
🚩 Home
) } export default Breadcrumb