diff --git a/src/components/Breadcrum.tsx b/src/components/Breadcrum.tsx index e744d64..0c96957 100644 --- a/src/components/Breadcrum.tsx +++ b/src/components/Breadcrum.tsx @@ -1,45 +1,55 @@ import React from "react" import ObjID from "../types/ObjID" import { ReactComponent as BreadcrumImage } from "./../assets/breadcrum.svg" +import { Link } from "react-router-dom" interface Props{ - path: ObjID + path?: ObjID onDirClick?: (path: ObjID) => void } -const Breadcrum: React.FC = (props) => { - const keyParts = props.path.key.split("/").filter(e=>e.length > 0) +const Breadcrum: React.FC = ({path,onDirClick}) => { + + if (!path){ + return + } + + const keyParts = path.key.split("/").filter(e=>e.length > 0) return (