heroes-of-chess-components 0.6.44 → 0.6.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
import { HocIconCrown, HocIconPodioRace } from "../../assets/race";
|
|
3
3
|
import useCharacters from "../../hooks/character/useCharacters";
|
|
4
|
-
import useIsMobile from "../../hooks/mobile/useMobile";
|
|
5
4
|
import HCoinLabel from "../HCoinLabel/HCoinLabel";
|
|
6
5
|
import HTitle from "../HTitle/HTitle";
|
|
7
6
|
import HBox from "../HBox/HBox";
|
|
8
7
|
|
|
9
8
|
const CharacterImage = styled("img")<{ margin?: string }>`
|
|
10
|
-
width:
|
|
9
|
+
width: 75px;
|
|
11
10
|
border-radius: 50%;
|
|
12
11
|
margin: ${({ margin }) => margin || "0"};
|
|
13
12
|
`;
|
|
@@ -36,7 +35,6 @@ interface HRaceTableProps {
|
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
const HRaceTable: React.FC<HRaceTableProps> = ({ data, points }) => {
|
|
39
|
-
const { isMobile } = useIsMobile(1100);
|
|
40
38
|
const { setCharacterPicture } = useCharacters();
|
|
41
39
|
|
|
42
40
|
const knowCoinsAndDiamonds = ({
|
|
@@ -113,15 +111,46 @@ const HRaceTable: React.FC<HRaceTableProps> = ({ data, points }) => {
|
|
|
113
111
|
return (
|
|
114
112
|
<HBox
|
|
115
113
|
width="100%"
|
|
116
|
-
direction={
|
|
114
|
+
direction={"column"}
|
|
117
115
|
justify="center"
|
|
118
116
|
align="center"
|
|
119
117
|
gap="15px"
|
|
120
118
|
>
|
|
119
|
+
{/* PODIO */}
|
|
120
|
+
<div style={{ alignSelf: "center", marginTop: "50px", width: "40%" }}>
|
|
121
|
+
<HBox
|
|
122
|
+
width="100%"
|
|
123
|
+
direction="column"
|
|
124
|
+
align="center"
|
|
125
|
+
>
|
|
126
|
+
<HBox
|
|
127
|
+
width="100%"
|
|
128
|
+
justify="center"
|
|
129
|
+
align="flex-end"
|
|
130
|
+
direction="row"
|
|
131
|
+
overflowX="visible"
|
|
132
|
+
overflowY="visible"
|
|
133
|
+
>
|
|
134
|
+
<CharacterImage
|
|
135
|
+
src={setCharacterPicture(getPlayerProfileInfo(data?.[1]) || {}).picture}
|
|
136
|
+
margin="0 30px -30px 0"
|
|
137
|
+
/>
|
|
138
|
+
<CharacterImage
|
|
139
|
+
src={setCharacterPicture(getPlayerProfileInfo(data?.[0]) || {}).picture}
|
|
140
|
+
margin="0 0 10px 0"
|
|
141
|
+
/>
|
|
142
|
+
<CharacterImage
|
|
143
|
+
src={setCharacterPicture(getPlayerProfileInfo(data?.[2]) || {}).picture}
|
|
144
|
+
margin="0 0 -60px 30px"
|
|
145
|
+
/>
|
|
146
|
+
</HBox>
|
|
147
|
+
<img src={HocIconPodioRace} alt="racePodio" width={400} />
|
|
148
|
+
</HBox>
|
|
149
|
+
</div>
|
|
121
150
|
<div style={{ maxWidth: "1200px", width: "100%" }}>
|
|
122
151
|
<HBox
|
|
123
152
|
borderRadius="23px"
|
|
124
|
-
width="
|
|
153
|
+
width="95%"
|
|
125
154
|
direction="column"
|
|
126
155
|
background={"purpleLight"}
|
|
127
156
|
overflowY="auto"
|
|
@@ -214,37 +243,6 @@ const HRaceTable: React.FC<HRaceTableProps> = ({ data, points }) => {
|
|
|
214
243
|
))}
|
|
215
244
|
</HBox>
|
|
216
245
|
</div>
|
|
217
|
-
{/* PODIO */}
|
|
218
|
-
<div style={{ alignSelf: isMobile ? "center" : "flex-start", marginTop: "50px", width: "40%" }}>
|
|
219
|
-
<HBox
|
|
220
|
-
width="100%"
|
|
221
|
-
direction="column"
|
|
222
|
-
align="center"
|
|
223
|
-
>
|
|
224
|
-
<HBox
|
|
225
|
-
width="100%"
|
|
226
|
-
justify="center"
|
|
227
|
-
align="flex-end"
|
|
228
|
-
direction="row"
|
|
229
|
-
overflowX="visible"
|
|
230
|
-
overflowY="visible"
|
|
231
|
-
>
|
|
232
|
-
<CharacterImage
|
|
233
|
-
src={setCharacterPicture(getPlayerProfileInfo(data?.[1]) || {}).picture}
|
|
234
|
-
margin="0 30px -30px 0"
|
|
235
|
-
/>
|
|
236
|
-
<CharacterImage
|
|
237
|
-
src={setCharacterPicture(getPlayerProfileInfo(data?.[0]) || {}).picture}
|
|
238
|
-
margin="0 0 10px 0"
|
|
239
|
-
/>
|
|
240
|
-
<CharacterImage
|
|
241
|
-
src={setCharacterPicture(getPlayerProfileInfo(data?.[2]) || {}).picture}
|
|
242
|
-
margin="0 0 -60px 30px"
|
|
243
|
-
/>
|
|
244
|
-
</HBox>
|
|
245
|
-
<img src={HocIconPodioRace} alt="racePodio" width={345} />
|
|
246
|
-
</HBox>
|
|
247
|
-
</div>
|
|
248
246
|
</HBox>
|
|
249
247
|
);
|
|
250
248
|
};
|