Skip to content

Commit 7fa6703

Browse files
icd2k3jschrader-nr
andauthored
fix: type error for route object for latest react-router release (#72)
* fix: type error for route object for latest react-router release * chore: bump patch version Co-authored-by: Justin Schrader <jschrader@newrelic.com>
1 parent ca18352 commit 7fa6703

File tree

3 files changed

+44
-42
lines changed

3 files changed

+44
-42
lines changed

package-lock.json

Lines changed: 40 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "use-react-router-breadcrumbs",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "A hook for displaying and setting breadcrumbs for react router",
55
"main": "dist/cjs/index.js",
66
"module": "dist/es/index.js",
@@ -55,7 +55,7 @@
5555
"pinst": "^3.0.0",
5656
"react": "^18.2.0",
5757
"react-dom": "^18.2.0",
58-
"react-router-dom": "^6.3.0",
58+
"react-router-dom": "^6.4.2",
5959
"rollup": "^2.79.0",
6060
"rollup-plugin-size": "^0.2.2",
6161
"rollup-plugin-terser": "^7.0.2",

src/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,11 @@ export interface BreadcrumbComponentProps<ParamKey extends string = string> {
7575
export type BreadcrumbComponentType<ParamKey extends string = string> =
7676
React.ComponentType<BreadcrumbComponentProps<ParamKey>>;
7777

78-
export interface BreadcrumbsRoute<ParamKey extends string = string>
79-
extends RouteObject {
78+
export type BreadcrumbsRoute<ParamKey extends string = string> = RouteObject & {
8079
children?: BreadcrumbsRoute[];
8180
breadcrumb?: BreadcrumbComponentType<ParamKey> | string | null;
8281
props?: { [x: string]: unknown };
83-
}
82+
};
8483

8584
export interface BreadcrumbData<ParamKey extends string = string> {
8685
match: BreadcrumbMatch<ParamKey>;

0 commit comments

Comments
 (0)