Skip to content

Commit

Permalink
fix(Page): add align center for descriptions item
Browse files Browse the repository at this point in the history
  • Loading branch information
Carrotzpc committed Jul 8, 2024
1 parent 935745c commit dd4ae6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Page/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ export const PageHeader: React.FC<PageHeaderProps> = 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(
<Divider dashed={false} key={`divider-${index}`} type="vertical" />
);
}
descriptionsElement.push(
<Flex gap={4} key={`desc-${index}`}>
<Flex align="center" gap={4} key={`desc-${index}`}>
{descIcon && <Tooltip title={descIcon.tooltip}>{descIcon.content}</Tooltip>}
<span>{text}</span>
</Flex>
Expand Down

0 comments on commit dd4ae6a

Please sign in to comment.