Skip to content

Commit

Permalink
💄 fix nested a warning in site code
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Dec 28, 2018
1 parent 536f791 commit 0ca2b3f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
10 changes: 5 additions & 5 deletions site/theme/static/home.less
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ svg {
padding: 48px 56px;
.product-block {
margin-bottom: 24px;
cursor: pointer;
color: @home-text-color;
&:last-child {
margin-bottom: 0;
Expand Down Expand Up @@ -309,10 +308,11 @@ svg {
justify-content: flex-end;
}
}
&:hover {
h4 {
color: @home-bg-color;
}
}

a.product-block:hover {
h4 {
color: @home-bg-color;
}
}
}
Expand Down
10 changes: 8 additions & 2 deletions site/theme/template/Home/Page2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -169,7 +175,7 @@ export default function Page2({ isMobile, locale }) {
{content}
</Col>
</Row>
</a>
</BlockElement>
);
});
return (
Expand Down

0 comments on commit 0ca2b3f

Please sign in to comment.