调整代码

This commit is contained in:
myf 2022-05-07 11:01:56 +08:00
parent efcc53866a
commit 9a087424b1
2 changed files with 5 additions and 4 deletions

View File

@ -160,7 +160,7 @@ const PanelFooter: React.FC<Props> = ({
{item.list && item.list.length > 0
? item.list?.map((childItem) => {
return (
<Link external href={childItem.link} color="textSubtle">
<Link key={item.key} external href={childItem.link} color="textSubtle">
<Text>{childItem.name}</Text>
</Link>
);
@ -168,7 +168,7 @@ const PanelFooter: React.FC<Props> = ({
: ""}
</Dropdown>
) : item.list && item.list.length > 0 ? (
<Link external href={item.list[0].link} color="textSubtle">
<Link key={item.key} external href={item.list[0].link} color="textSubtle">
<Image src={item.icon} title={item.name} />
</Link>
) : (
@ -184,7 +184,7 @@ const PanelFooter: React.FC<Props> = ({
<div className="content">
{moreList?.map((item) => {
return item.list && item.list.length > 1 ? (
<ImageItem>
<ImageItem key={item.key}>
<Flex className="content-item" alignItems="center" justifyContent="space-between">
<>
<Image src={item.icon} title={item.name} />
@ -203,7 +203,7 @@ const PanelFooter: React.FC<Props> = ({
</div>
</ImageItem>
) : item.list && item.list.length > 0 ? (
<SingleLink external href={item.list[0].link} color="textSubtle">
<SingleLink key={item.key} external href={item.list[0].link} color="textSubtle">
<Image src={item.icon} title={item.name} />
</SingleLink>
) : (

View File

@ -69,6 +69,7 @@ export interface NavProps extends PanelProps {
export interface SocialLink {
icon?: string;
name?: string;
key?: string | number;
list?: SocialLinkList[];
}
export interface SocialLinkList {