Skip to content

Commit

Permalink
fix: type error for route object for latest react-router release (#72)
Browse files Browse the repository at this point in the history
* fix: type error for route object for latest react-router release

* chore: bump patch version

Co-authored-by: Justin Schrader <jschrader@newrelic.com>
  • Loading branch information
icd2k3 and jschrader-nr committed Oct 11, 2022
1 parent ca18352 commit 7fa6703
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 42 deletions.
77 changes: 40 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "use-react-router-breadcrumbs",
"version": "4.0.0",
"version": "4.0.1",
"description": "A hook for displaying and setting breadcrumbs for react router",
"main": "dist/cjs/index.js",
"module": "dist/es/index.js",
Expand Down Expand Up @@ -55,7 +55,7 @@
"pinst": "^3.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.3.0",
"react-router-dom": "^6.4.2",
"rollup": "^2.79.0",
"rollup-plugin-size": "^0.2.2",
"rollup-plugin-terser": "^7.0.2",
Expand Down
5 changes: 2 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,11 @@ export interface BreadcrumbComponentProps<ParamKey extends string = string> {
export type BreadcrumbComponentType<ParamKey extends string = string> =
React.ComponentType<BreadcrumbComponentProps<ParamKey>>;

export interface BreadcrumbsRoute<ParamKey extends string = string>
extends RouteObject {
export type BreadcrumbsRoute<ParamKey extends string = string> = RouteObject & {
children?: BreadcrumbsRoute[];
breadcrumb?: BreadcrumbComponentType<ParamKey> | string | null;
props?: { [x: string]: unknown };
}
};

export interface BreadcrumbData<ParamKey extends string = string> {
match: BreadcrumbMatch<ParamKey>;
Expand Down

0 comments on commit 7fa6703

Please sign in to comment.