From 702e994e64ea0ebd1430bd79b7efb224568d7d95 Mon Sep 17 00:00:00 2001 From: goodm2ice Date: Wed, 12 Jan 2022 23:46:07 +0500 Subject: [PATCH] =?UTF-8?q?*=20LayoutPortal=20=D1=83=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=20=D0=BA=D0=B0=D0=BA=20mem?= =?UTF-8?q?o=20*=20LayoutPortalProps=20=D1=80=D0=B0=D1=81=D1=88=D0=B8?= =?UTF-8?q?=D1=80=D0=B5=D0=BD=20=D1=81=20LayoutProps=20*=20=D1=82=D0=B8?= =?UTF-8?q?=D0=BF=20=D0=B7=D0=B0=D0=B3=D0=BE=D0=BB=D0=BE=D0=B2=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D1=91=D0=BD=20=D0=BD=D0=B0=20?= =?UTF-8?q?ReactNode=20*=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=8D=D0=BA=D1=81=D0=BF=D0=BE=D1=80=D1=82=20LayoutPor?= =?UTF-8?q?talProps=20*=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=20=D1=8D=D0=BA=D1=81=D0=BF=D0=BE=D1=80=D1=82=20=D0=BF=D0=BE-?= =?UTF-8?q?=D1=83=D0=BC=D0=BE=D0=BB=D1=87=D0=B0=D0=BD=D0=B8=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Layout/AdminLayoutPortal.tsx | 15 +++++++++------ src/components/Layout/LayoutPortal.tsx | 15 +++++++++------ src/components/Layout/index.ts | 3 +++ 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/components/Layout/AdminLayoutPortal.tsx b/src/components/Layout/AdminLayoutPortal.tsx index 68d33cf..3125e97 100644 --- a/src/components/Layout/AdminLayoutPortal.tsx +++ b/src/components/Layout/AdminLayoutPortal.tsx @@ -1,13 +1,14 @@ -import { Button, Layout } from 'antd' +import { memo, ReactNode } from 'react' import { Link } from 'react-router-dom' +import { Button, Layout, LayoutProps } from 'antd' + import PageHeader from '../PageHeader' -type LayoutPortalProps = { - title?: string - [props: string]: any +export type AdminLayoutPortalProps = LayoutProps & { + title?: ReactNode } -export const AdminLayoutPortal: React.FC = ({title, ...props}) => ( +export const AdminLayoutPortal = memo(({ title, ...props }) => (