diff --git a/codegen.yml b/codegen.yml index 1c2ec82..4a94f06 100644 --- a/codegen.yml +++ b/codegen.yml @@ -10,7 +10,10 @@ generates: - "typescript" - "typescript-operations" - "typescript-react-apollo" + - add: + content: "import ObjID from './../types/ObjID'" config: withHooks: true scalars: - DateTime: string \ No newline at end of file + DateTime: string + objID: ObjID \ No newline at end of file diff --git a/package.json b/package.json index 445cd40..9c05803 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ }, "devDependencies": { "@craco/craco": "^6.2.0", + "@graphql-codegen/add": "^3.1.0", "@graphql-codegen/cli": "1.21.7", "@graphql-codegen/introspection": "1.18.2", "@graphql-codegen/typescript": "^1.23.0", diff --git a/src/components/Breadcrum.tsx b/src/components/Breadcrum.tsx index f338a7d..e744d64 100644 --- a/src/components/Breadcrum.tsx +++ b/src/components/Breadcrum.tsx @@ -1,25 +1,36 @@ import React from "react" +import ObjID from "../types/ObjID" import { ReactComponent as BreadcrumImage } from "./../assets/breadcrum.svg" interface Props{ - path: string - onDirClick?: (path: string) => void + path: ObjID + onDirClick?: (path: ObjID) => void } const Breadcrum: React.FC = (props) => { - const parts = props.path.split("/").filter(e=>e.length > 0) + const keyParts = props.path.key.split("/").filter(e=>e.length > 0) return ( -