File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
ui/helpers/higher-order-components/with-router-hooks Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export type RouterHooksProps = {
1515function withRouterHooks < Props extends object > (
1616 WrappedComponent : React . ComponentType < Props & RouterHooksProps > ,
1717) : React . ComponentType < Props > {
18- const ComponentWithRouterHooks = ( props : Props ) => {
18+ const useComponentWithRouterHooks = ( props : Props ) => {
1919 const navigate = useNavigate ( ) ;
2020 const location = useLocation ( ) ;
2121 const params = useParams ( ) ;
@@ -31,11 +31,11 @@ function withRouterHooks<Props extends object>(
3131 } ;
3232
3333 // Preserve component name for debugging
34- ComponentWithRouterHooks . displayName = `withRouterHooks(${
34+ useComponentWithRouterHooks . displayName = `withRouterHooks(${
3535 WrappedComponent . displayName || WrappedComponent . name || 'Component'
3636 } )`;
3737
38- return ComponentWithRouterHooks ;
38+ return useComponentWithRouterHooks ;
3939}
4040
4141export default withRouterHooks ;
You can’t perform that action at this time.
0 commit comments