Skip to content

Commit ffb667a

Browse files
authored
fix: icons and "Sort By" div overlapping (#913)
1 parent 4fed8c7 commit ffb667a

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

src/components/Grid.tsx

+11-4
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ class Grid extends React.Component<
643643
if (cardsOfType.length) {
644644
return (
645645
// Add a header for the card type
646-
<>
646+
<div className="marketplace-content">
647647
{/* Add a header for the card type */}
648648
<h2 className="marketplace-card-type-heading">{t(`tabs.${cardType.name}`)}</h2>
649649
{/* Add the grid and cards */}
@@ -654,7 +654,7 @@ class Grid extends React.Component<
654654
>
655655
{cardsOfType}
656656
</div>
657-
</>
657+
</div>
658658
);
659659
}
660660
return null;
@@ -666,8 +666,15 @@ class Grid extends React.Component<
666666
</Button>
667667
) : null}
668668
<footer className="marketplace-footer">
669-
{!this.state.endOfList &&
670-
(this.state.rest && this.state.cards.length > 0 ? <LoadMoreIcon onClick={this.loadMore.bind(this)} /> : <LoadingIcon />)}
669+
{!this.state.endOfList ? (
670+
this.state.rest && this.state.cards.length > 0 ? (
671+
<LoadMoreIcon onClick={this.loadMore.bind(this)} />
672+
) : (
673+
<LoadingIcon />
674+
)
675+
) : (
676+
<div style={{ height: "64px" }} />
677+
)}
671678
</footer>
672679
<TopBarContent switchCallback={this.switchTo.bind(this)} links={this.CONFIG.tabs} activeLink={this.CONFIG.activeTab} />
673680
</section>

src/components/Icons/LoadMoreIcon.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ import React from "react";
33
export default class LoadMoreIcon extends React.Component<{ onClick: () => void }> {
44
render() {
55
return (
6-
<div onClick={this.props.onClick}>
6+
<div
7+
style={{
8+
marginTop: "60px"
9+
}}
10+
onClick={this.props.onClick}
11+
>
712
<p
813
style={{
914
fontSize: 100,

src/components/Icons/LoadingIcon.tsx

+9-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@ const LoadingIcon = () => {
1818
// })));
1919

2020
return (
21-
<svg width="100px" height="100px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" role="img" aria-label="Loading Icon">
21+
<svg
22+
style={{ marginTop: "60px" }}
23+
width="100px"
24+
height="100px"
25+
viewBox="0 0 100 100"
26+
preserveAspectRatio="xMidYMid"
27+
role="img"
28+
aria-label="Loading Icon"
29+
>
2230
<circle cx="50" cy="50" r="0" fill="none" stroke="currentColor" strokeWidth="2">
2331
<animate
2432
attributeName="r"

src/styles/components/_grid.scss

+4
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,7 @@
152152
bottom: 32px;
153153
left: 100%;
154154
}
155+
156+
.marketplace-content {
157+
margin-top: 60px;
158+
}

0 commit comments

Comments
 (0)