From dd4ae6a700a42ed7cb76f83c638102785898e0de Mon Sep 17 00:00:00 2001 From: Carrotzpc Date: Mon, 8 Jul 2024 17:50:43 +0800 Subject: [PATCH] fix(Page): add align center for descriptions item --- src/Page/Header/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Page/Header/index.tsx b/src/Page/Header/index.tsx index bf27a69..acb0194 100644 --- a/src/Page/Header/index.tsx +++ b/src/Page/Header/index.tsx @@ -87,7 +87,7 @@ export const PageHeader: React.FC = props => { const DescriptionsNode = useMemo(() => { const descriptionsElement: React.ReactNode[] = []; - for (const [index, desc] of descriptions.entries()) { + for (const [index, desc] of descriptions.filter(d => !!d).entries()) { const { icon: descIcon, text } = desc; if (status || index >= 1) { descriptionsElement.push( @@ -95,7 +95,7 @@ export const PageHeader: React.FC = props => { ); } descriptionsElement.push( - + {descIcon && {descIcon.content}} {text}