💄 fix nested a warning in site code

This commit is contained in:
afc163 2018-12-28 18:14:19 +08:00
parent 536f791ea9
commit 0ca2b3f41c
No known key found for this signature in database
GPG Key ID: 738F973FCE5C6B48
2 changed files with 13 additions and 7 deletions

View File

@ -241,7 +241,6 @@ svg {
padding: 48px 56px;
.product-block {
margin-bottom: 24px;
cursor: pointer;
color: @home-text-color;
&:last-child {
margin-bottom: 0;
@ -309,10 +308,11 @@ svg {
justify-content: flex-end;
}
}
&:hover {
h4 {
color: @home-bg-color;
}
}
a.product-block:hover {
h4 {
color: @home-bg-color;
}
}
}

View File

@ -152,8 +152,14 @@ export default function Page2({ isMobile, locale }) {
</span>,
];
const content = isMobile && !i ? componentButton : moreContent;
const BlockElement = item.link ? 'a' : 'div';
return (
<a className="product-block" key={item.name} href={item.link} style={{ display: 'block' }}>
<BlockElement
className="product-block"
key={item.name}
href={item.link}
style={{ display: 'block' }}
>
<Row>
<Col
xs={8}
@ -169,7 +175,7 @@ export default function Page2({ isMobile, locale }) {
{content}
</Col>
</Row>
</a>
</BlockElement>
);
});
return (