From bf2ee64bf2d9579695ffa83fa05c850b4f7d859f Mon Sep 17 00:00:00 2001 From: eternallycyf <969475322@qq.com> Date: Sun, 23 Apr 2023 17:31:05 +0800 Subject: [PATCH] =?UTF-8?q?feat=E2=9C=A8:=20=20add=20withAuthentication=20?= =?UTF-8?q?HOC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/Enhance/withAuthentication.tsx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/core/Enhance/withAuthentication.tsx diff --git a/src/core/Enhance/withAuthentication.tsx b/src/core/Enhance/withAuthentication.tsx new file mode 100644 index 0000000..cc50866 --- /dev/null +++ b/src/core/Enhance/withAuthentication.tsx @@ -0,0 +1,23 @@ +import React from 'react'; + +interface Props { + [key: string]: any; +} + +interface ComponentWithAuthProps extends Props { + isAuth: boolean; +} + +export default function withAuthentication
( + Component: React.ComponentType
,
+): React.FC