import React from "react"; import { Link } from "react-router-dom"; import { Layout, Breadcrumb } from "antd"; const { Content } = Layout; type PageLayoutProps = { nav: { path?: string; name: string; }[]; children?: any; }; export default function PageLayout(props: PageLayoutProps) { return <> {props.nav.map((part, index) => {part.path ? {part.name} : part.name} )} {props.children} ; }