From cbf937a8327a3b32ae98c9c29fe9ea5623db5441 Mon Sep 17 00:00:00 2001 From: gloginov Date: Wed, 9 Oct 2024 07:16:35 +0500 Subject: [PATCH] [SOK-32] *change type for hoc --- packages/client/src/components/hoc/withAuthUser.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/hoc/withAuthUser.tsx b/packages/client/src/components/hoc/withAuthUser.tsx index b3a81c8..ca8928a 100644 --- a/packages/client/src/components/hoc/withAuthUser.tsx +++ b/packages/client/src/components/hoc/withAuthUser.tsx @@ -5,8 +5,13 @@ import { useNavigate, useLocation } from 'react-router-dom' import { RootState, useAppDispatch } from '@/store' import { useSelector } from 'react-redux' +type WithAuthUserProps = { + userIsLogged: boolean + user: UserType | null +} + export default function withAuthUser

( - Component: ComponentType

, + Component: ComponentType

, redirectTo?: string ) { return function WrappedWithAuthUser(props: P) {