Skip to content

Commit 076904c

Browse files
author
Vincent Dubois
committed
Fix type of NavigateProps
1 parent b67e0b4 commit 076904c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

templates/admin/src/lib/plume-admin-router/Navigate.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { routes } from '@components/router/RouterDefinition.ts';
1+
import { DeclaredRoutePaths, routes } from '@components/router/RouterDefinition.ts';
22
import { useEffect } from 'react';
33

44
type NavigateProps = {
5-
to: ReturnType<typeof routes[unknown]>,
5+
to: ReturnType<typeof routes[DeclaredRoutePaths]>,
66
};
77

88
function Navigate(
@@ -12,7 +12,6 @@ function Navigate(
1212
): null {
1313
useEffect(() => {
1414
to.push();
15-
// eslint-disable-next-line react-hooks/exhaustive-deps -- need to run only once on mount
1615
}, []);
1716

1817
return null;

0 commit comments

Comments
 (0)