@ludo.ninja/components 1.4.2 → 1.4.4
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.
- package/package.json +1 -1
- package/src/components/index.ts +1 -0
- package/src/index.ts +2 -0
- package/src/system/Filters/helpers.ts +4 -4
- package/src/system/Filters/index.ts +2 -0
- package/src/system/index.ts +1 -0
- package/src/components/assetPage/assetLikes/index.tsx +0 -96
- package/src/components/assetPage/assetNft/index.tsx +0 -52
- package/src/components/assetPage/assetWrapper/index.tsx +0 -174
- package/src/components/assetPage/audioVideoPlayer/Duration.tsx +0 -32
- package/src/components/assetPage/audioVideoPlayer/index.tsx +0 -525
- package/src/components/assetPage/category/index.tsx +0 -71
- package/src/components/assetPage/description/index.tsx +0 -54
- package/src/components/assetPage/detailsAccordeon/index.tsx +0 -130
- package/src/components/assetPage/figCaption/index.tsx +0 -299
- package/src/components/assetPage/index.ts +0 -13
- package/src/components/assetPage/information/index.tsx +0 -194
- package/src/components/assetPage/marketPlaces/index.tsx +0 -86
- package/src/components/assetPage/media/AssetImage/index.tsx +0 -217
- package/src/components/assetPage/moreDropDown/index.tsx +0 -176
- package/src/components/assetPage/participants/index.tsx +0 -330
- package/src/components/assetPage/priceRank/index.tsx +0 -192
- package/src/components/assetPage/properties/index.tsx +0 -56
- package/src/components/assetPage/slider/index.tsx +0 -235
- package/src/components/assetPage/slider/slideItem.tsx +0 -55
- package/src/components/assetPage/slider/store.ts +0 -23
- package/src/components/assetPage/tittle/index.tsx +0 -143
- package/src/components/assetPage/viewer3D/index.tsx +0 -206
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import Link from 'next/link';
|
|
4
|
-
|
|
5
|
-
import styled from 'styled-components';
|
|
6
|
-
|
|
7
|
-
import { identitySchema as schema } from '@ludo.ninja/api';
|
|
8
|
-
import { adaptiveValueCalc } from '@ludo.ninja/ui/build/utils/4k';
|
|
9
|
-
import { shortenedText } from '@ludo.ninja/utils';
|
|
10
|
-
|
|
11
|
-
import { mediaQuery } from '@/styles/ScreenWidth';
|
|
12
|
-
import { BlackColor, TextGrayColor } from '@/styles/colors';
|
|
13
|
-
|
|
14
|
-
import { Flex, H5, H6, ProfilePic } from '@system';
|
|
15
|
-
|
|
16
|
-
import { getAdaptiveScale } from '@/utils/adaptive/scale';
|
|
17
|
-
import { CopyButton } from '@/utils/copyBtn';
|
|
18
|
-
import { useWindowDimensionsWithServerInitial } from '@/utils/screen';
|
|
19
|
-
|
|
20
|
-
import { getUserPicImage } from '@/dto/common/Media/Urls';
|
|
21
|
-
|
|
22
|
-
import DetailsIcon from '@/public/assetPage/details.svg';
|
|
23
|
-
|
|
24
|
-
type ParticipantsProps = {
|
|
25
|
-
creatorsAddresses: string[] | null;
|
|
26
|
-
creatorsProfiles: schema.IProfile[];
|
|
27
|
-
ownersProfiles: schema.IProfile[];
|
|
28
|
-
ownersAddresses: string[] | null;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const MultiFlexRight = styled(Flex)`
|
|
32
|
-
margin-left: 100px;
|
|
33
|
-
align-items: center;
|
|
34
|
-
|
|
35
|
-
${mediaQuery.desktop} {
|
|
36
|
-
margin: 20px 0 0 0;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
${mediaQuery.minWidthFourK} {
|
|
40
|
-
margin-left: ${adaptiveValueCalc(100)};
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
43
|
-
|
|
44
|
-
const MultiFlex = styled(Flex)`
|
|
45
|
-
margin: 20px 0 10px;
|
|
46
|
-
|
|
47
|
-
${mediaQuery.desktop} {
|
|
48
|
-
flex-direction: column;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
${mediaQuery.minWidthFourK} {
|
|
52
|
-
margin: ${adaptiveValueCalc(20)} 0 ${adaptiveValueCalc(10)};
|
|
53
|
-
}
|
|
54
|
-
`;
|
|
55
|
-
|
|
56
|
-
const SMultipleCreators = styled(Flex)`
|
|
57
|
-
margin-left: 20px;
|
|
58
|
-
|
|
59
|
-
img {
|
|
60
|
-
width: 40px;
|
|
61
|
-
height: 40px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
${mediaQuery.minWidthFourK} {
|
|
65
|
-
margin-left: ${adaptiveValueCalc(20)};
|
|
66
|
-
|
|
67
|
-
img {
|
|
68
|
-
width: ${adaptiveValueCalc(40)};
|
|
69
|
-
height: ${adaptiveValueCalc(40)};
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
`;
|
|
73
|
-
|
|
74
|
-
const SMultipleCreatorsH6 = styled(H6)`
|
|
75
|
-
margin-left: 15px;
|
|
76
|
-
color: ${TextGrayColor};
|
|
77
|
-
|
|
78
|
-
${mediaQuery.minWidthFourK} {
|
|
79
|
-
margin-left: ${adaptiveValueCalc(15)};
|
|
80
|
-
}
|
|
81
|
-
`;
|
|
82
|
-
|
|
83
|
-
const MultipleCreators = ({
|
|
84
|
-
creatorsProfiles,
|
|
85
|
-
creatorsAddresses,
|
|
86
|
-
}: {
|
|
87
|
-
creatorsProfiles: schema.IProfile[];
|
|
88
|
-
creatorsAddresses: string[] | null;
|
|
89
|
-
}) => {
|
|
90
|
-
if (!creatorsProfiles && !creatorsAddresses) return null;
|
|
91
|
-
|
|
92
|
-
let accumulatedResult;
|
|
93
|
-
if (creatorsProfiles) {
|
|
94
|
-
accumulatedResult = [...creatorsProfiles];
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (creatorsAddresses) {
|
|
98
|
-
creatorsAddresses.map((item) => {
|
|
99
|
-
return { userId: item, userpic: '/defaultUserpics/defaultUserpic.svg' };
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
accumulatedResult = [
|
|
103
|
-
...(accumulatedResult as unknown as schema.IProfile[]),
|
|
104
|
-
creatorsAddresses as unknown as schema.IProfile[],
|
|
105
|
-
];
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
return (
|
|
109
|
-
<Flex alignItems="center">
|
|
110
|
-
<SMultipleCreators flexDirection="row" alignItems="center">
|
|
111
|
-
{creatorsProfiles?.slice(0, 3).map((creator) => {
|
|
112
|
-
return (
|
|
113
|
-
<ProfilePic
|
|
114
|
-
size={40}
|
|
115
|
-
key={creator?.userId}
|
|
116
|
-
userPicSrc={getUserPicImage(
|
|
117
|
-
creator?.userpic as string,
|
|
118
|
-
'/defaultUserpics/defaultUserpic.svg'
|
|
119
|
-
)}
|
|
120
|
-
/>
|
|
121
|
-
);
|
|
122
|
-
})}
|
|
123
|
-
<SMultipleCreatorsH6>
|
|
124
|
-
{accumulatedResult && accumulatedResult?.length} Creators
|
|
125
|
-
</SMultipleCreatorsH6>
|
|
126
|
-
</SMultipleCreators>
|
|
127
|
-
</Flex>
|
|
128
|
-
);
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
const SSingleUserLink = styled(Link)`
|
|
132
|
-
font-size: 14px;
|
|
133
|
-
|
|
134
|
-
${mediaQuery.minWidthFourK} {
|
|
135
|
-
font-size: ${adaptiveValueCalc(14)};
|
|
136
|
-
}
|
|
137
|
-
`;
|
|
138
|
-
|
|
139
|
-
const SSingleUser = styled(Flex)`
|
|
140
|
-
margin-bottom: 10px;
|
|
141
|
-
|
|
142
|
-
img {
|
|
143
|
-
width: 40px;
|
|
144
|
-
height: 40px;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
${mediaQuery.minWidthFourK} {
|
|
148
|
-
margin-bottom: ${adaptiveValueCalc(10)};
|
|
149
|
-
|
|
150
|
-
img {
|
|
151
|
-
width: ${adaptiveValueCalc(40)};
|
|
152
|
-
height: ${adaptiveValueCalc(40)};
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
`;
|
|
156
|
-
|
|
157
|
-
const SSingleUserFlex = styled(Flex)`
|
|
158
|
-
margin-left: 16px;
|
|
159
|
-
|
|
160
|
-
${mediaQuery.minWidthFourK} {
|
|
161
|
-
margin-left: ${adaptiveValueCalc(16)};
|
|
162
|
-
}
|
|
163
|
-
`;
|
|
164
|
-
|
|
165
|
-
const SingleUser = (props: {
|
|
166
|
-
profile?: Partial<schema.IProfile> | null;
|
|
167
|
-
address?: string | null;
|
|
168
|
-
title: string;
|
|
169
|
-
}) => {
|
|
170
|
-
if (!props.profile && !props.address) return null;
|
|
171
|
-
|
|
172
|
-
const isLudoWallet = (userName: string) => {
|
|
173
|
-
return userName ? (
|
|
174
|
-
<H5 color={BlackColor}>{userName}</H5>
|
|
175
|
-
) : (
|
|
176
|
-
<CopyButton value={props.address}>
|
|
177
|
-
<H5 color={BlackColor}>{shortenedText(props.address as string)}</H5>
|
|
178
|
-
</CopyButton>
|
|
179
|
-
);
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
const ludoUserMurkUp = (name?: string | null) => {
|
|
183
|
-
return name ? (
|
|
184
|
-
<SSingleUserLink href={`/profile/${props.profile?.userId}/nfts`}>
|
|
185
|
-
{name}
|
|
186
|
-
</SSingleUserLink>
|
|
187
|
-
) : (
|
|
188
|
-
isLudoWallet(props.profile?.username as string)
|
|
189
|
-
);
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
return (
|
|
193
|
-
<SSingleUser width={'50%'} alignItems="center">
|
|
194
|
-
{Boolean(props?.profile && props?.profile?.userpic) && (
|
|
195
|
-
<ProfilePic
|
|
196
|
-
size={40}
|
|
197
|
-
userPicSrc={getUserPicImage(
|
|
198
|
-
props?.profile?.userpic as string,
|
|
199
|
-
'/defaultUserpics/defaultUserpic.svg'
|
|
200
|
-
)}
|
|
201
|
-
/>
|
|
202
|
-
)}
|
|
203
|
-
{Boolean(props?.profile && props?.profile?.userpic) || (
|
|
204
|
-
<ProfilePic
|
|
205
|
-
size={40}
|
|
206
|
-
userPicSrc={'/defaultUserpics/defaultUserpic.svg'}
|
|
207
|
-
/>
|
|
208
|
-
)}
|
|
209
|
-
|
|
210
|
-
<SSingleUserFlex flexDirection="column">
|
|
211
|
-
<H6 color={TextGrayColor}>{props.title}</H6>
|
|
212
|
-
{ludoUserMurkUp(props?.profile && (props.profile.username as string))}
|
|
213
|
-
</SSingleUserFlex>
|
|
214
|
-
</SSingleUser>
|
|
215
|
-
);
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
const SIconWrapper = styled.div`
|
|
219
|
-
display: flex;
|
|
220
|
-
align-items: center;
|
|
221
|
-
justify-content: center;
|
|
222
|
-
width: 12px;
|
|
223
|
-
height: 12px;
|
|
224
|
-
margin-right: 10px;
|
|
225
|
-
|
|
226
|
-
${mediaQuery.minWidthFourK} {
|
|
227
|
-
width: ${adaptiveValueCalc(12)};
|
|
228
|
-
height: ${adaptiveValueCalc(12)};
|
|
229
|
-
margin-right: ${adaptiveValueCalc(10)};
|
|
230
|
-
}
|
|
231
|
-
`;
|
|
232
|
-
|
|
233
|
-
const DetailsIconResize = () => {
|
|
234
|
-
const { windowDimensions } = useWindowDimensionsWithServerInitial();
|
|
235
|
-
|
|
236
|
-
return (
|
|
237
|
-
<SIconWrapper>
|
|
238
|
-
<DetailsIcon
|
|
239
|
-
style={getAdaptiveScale({ windowDimensions, currentSize: 1 })}
|
|
240
|
-
/>
|
|
241
|
-
</SIconWrapper>
|
|
242
|
-
);
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
const SMultipleOwnersFlex = styled(Flex)`
|
|
246
|
-
margin-bottom: 7px;
|
|
247
|
-
|
|
248
|
-
${mediaQuery.minWidthFourK} {
|
|
249
|
-
margin-bottom: ${adaptiveValueCalc(7)};
|
|
250
|
-
}
|
|
251
|
-
`;
|
|
252
|
-
|
|
253
|
-
const MultipleOwners = ({
|
|
254
|
-
ownersProfiles,
|
|
255
|
-
ownersAddresses,
|
|
256
|
-
}: {
|
|
257
|
-
ownersProfiles: schema.IProfile[];
|
|
258
|
-
ownersAddresses: string[] | null;
|
|
259
|
-
}) => {
|
|
260
|
-
if (!ownersAddresses && !ownersProfiles) return null;
|
|
261
|
-
|
|
262
|
-
let accumulatedResult = [...ownersProfiles];
|
|
263
|
-
|
|
264
|
-
if (ownersAddresses) {
|
|
265
|
-
accumulatedResult = [
|
|
266
|
-
...accumulatedResult,
|
|
267
|
-
ownersAddresses as unknown as schema.IProfile,
|
|
268
|
-
];
|
|
269
|
-
}
|
|
270
|
-
return (
|
|
271
|
-
<MultiFlexRight alignItems="center">
|
|
272
|
-
<Flex flexDirection="column">
|
|
273
|
-
<SMultipleOwnersFlex alignItems="center">
|
|
274
|
-
<DetailsIconResize />{' '}
|
|
275
|
-
<H6>
|
|
276
|
-
{accumulatedResult.length}{' '}
|
|
277
|
-
{accumulatedResult.length > 1 ? 'Owners' : 'Owner'}
|
|
278
|
-
</H6>
|
|
279
|
-
</SMultipleOwnersFlex>
|
|
280
|
-
{/*<Flex alignItems="center">*/}
|
|
281
|
-
{/* <OwnersIcon style={{ margin: '0 8.5px 0px -1.5px' }} />{' '}*/}
|
|
282
|
-
{/* <H6>14/100 Copies owned</H6>*/}
|
|
283
|
-
{/*</Flex>*/}
|
|
284
|
-
</Flex>
|
|
285
|
-
</MultiFlexRight>
|
|
286
|
-
);
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
export const Participants = ({
|
|
290
|
-
creatorsProfiles,
|
|
291
|
-
ownersProfiles,
|
|
292
|
-
creatorsAddresses,
|
|
293
|
-
ownersAddresses,
|
|
294
|
-
}: ParticipantsProps) => {
|
|
295
|
-
// console.clear();
|
|
296
|
-
// console.log(creatorsProfiles, 'creatorsProfiles');
|
|
297
|
-
// console.log(creatorsAddresses, 'creatorsAddresses');
|
|
298
|
-
// console.log(ownersProfiles, 'ownersProfiles');
|
|
299
|
-
|
|
300
|
-
return (
|
|
301
|
-
<>
|
|
302
|
-
{(creatorsProfiles?.length && creatorsProfiles?.length > 1) ||
|
|
303
|
-
(ownersProfiles?.length && ownersProfiles?.length > 1) ? (
|
|
304
|
-
<MultiFlex>
|
|
305
|
-
<MultipleCreators
|
|
306
|
-
creatorsAddresses={creatorsAddresses}
|
|
307
|
-
creatorsProfiles={creatorsProfiles}
|
|
308
|
-
/>
|
|
309
|
-
<MultipleOwners
|
|
310
|
-
ownersProfiles={ownersProfiles}
|
|
311
|
-
ownersAddresses={ownersAddresses}
|
|
312
|
-
/>
|
|
313
|
-
</MultiFlex>
|
|
314
|
-
) : (
|
|
315
|
-
<MultiFlex>
|
|
316
|
-
<SingleUser
|
|
317
|
-
title="Creator"
|
|
318
|
-
address={creatorsAddresses?.[0]}
|
|
319
|
-
profile={creatorsProfiles?.[0]}
|
|
320
|
-
/>
|
|
321
|
-
<SingleUser
|
|
322
|
-
title="Owner"
|
|
323
|
-
address={ownersAddresses?.[0]}
|
|
324
|
-
profile={ownersProfiles?.[0]}
|
|
325
|
-
/>
|
|
326
|
-
</MultiFlex>
|
|
327
|
-
)}
|
|
328
|
-
</>
|
|
329
|
-
);
|
|
330
|
-
};
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
|
|
5
|
-
// import Skeleton from 'react-loading-skeleton';
|
|
6
|
-
import { BlockChainEntity } from '@ludo.ninja/core';
|
|
7
|
-
import { adaptiveValueCalc } from '@ludo.ninja/ui/build/utils/4k';
|
|
8
|
-
import { getRankColor } from '@ludo.ninja/utils';
|
|
9
|
-
|
|
10
|
-
import { mediaQuery } from '@/styles/ScreenWidth';
|
|
11
|
-
import {
|
|
12
|
-
BlackColor,
|
|
13
|
-
InactiveButtonColor,
|
|
14
|
-
TextGrayColor,
|
|
15
|
-
WhiteColor,
|
|
16
|
-
} from '@/styles/colors';
|
|
17
|
-
|
|
18
|
-
import { Box, Flex, H2, H3, H6 } from '@system';
|
|
19
|
-
|
|
20
|
-
type PriceRankProps = {
|
|
21
|
-
blockchain: BlockChainEntity;
|
|
22
|
-
rank: number;
|
|
23
|
-
latestPriceAmount: number | null;
|
|
24
|
-
latestPriceCurrency: string | null;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const RangeContainer = styled.div`
|
|
28
|
-
display: block;
|
|
29
|
-
width: 100px;
|
|
30
|
-
background: ${InactiveButtonColor};
|
|
31
|
-
height: 9px;
|
|
32
|
-
border-radius: 2px;
|
|
33
|
-
|
|
34
|
-
${mediaQuery.desktop} {
|
|
35
|
-
width: 40px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
${mediaQuery.minWidthFourK} {
|
|
39
|
-
width: ${adaptiveValueCalc(100)};
|
|
40
|
-
height: ${adaptiveValueCalc(9)};
|
|
41
|
-
border-radius: ${adaptiveValueCalc(2)};
|
|
42
|
-
}
|
|
43
|
-
`;
|
|
44
|
-
|
|
45
|
-
const RangeValue = styled.div<{ rankValue: number | null | undefined }>`
|
|
46
|
-
display: block;
|
|
47
|
-
background: ${(props) => props.rankValue && getRankColor(props.rankValue)};
|
|
48
|
-
height: 100%;
|
|
49
|
-
border-radius: 2px 0 0 2px;
|
|
50
|
-
|
|
51
|
-
${mediaQuery.minWidthFourK} {
|
|
52
|
-
border-radius: ${adaptiveValueCalc(2)} 0 0 ${adaptiveValueCalc(2)};
|
|
53
|
-
}
|
|
54
|
-
`;
|
|
55
|
-
|
|
56
|
-
const SPrice = styled(Box)`
|
|
57
|
-
width: 65%;
|
|
58
|
-
border-radius: 6px;
|
|
59
|
-
margin-right: 15px;
|
|
60
|
-
padding: 15px;
|
|
61
|
-
background-color: ${WhiteColor};
|
|
62
|
-
|
|
63
|
-
.title-price {
|
|
64
|
-
margin-bottom: 6px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.price-latest {
|
|
68
|
-
margin-left: 8px;
|
|
69
|
-
margin-right: 8px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
${mediaQuery.minWidthFourK} {
|
|
73
|
-
border-radius: ${adaptiveValueCalc(6)};
|
|
74
|
-
margin-right: ${adaptiveValueCalc(15)};
|
|
75
|
-
padding: ${adaptiveValueCalc(15)};
|
|
76
|
-
|
|
77
|
-
.title-price {
|
|
78
|
-
margin-bottom: ${adaptiveValueCalc(6)};
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.price-latest {
|
|
82
|
-
margin-left: ${adaptiveValueCalc(8)};
|
|
83
|
-
margin-right: ${adaptiveValueCalc(8)};
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
`;
|
|
87
|
-
|
|
88
|
-
const SPriceFlex = styled(Flex)`
|
|
89
|
-
border-radius: 6px;
|
|
90
|
-
|
|
91
|
-
${mediaQuery.minWidthFourK} {
|
|
92
|
-
border-radius: ${adaptiveValueCalc(6)};
|
|
93
|
-
}
|
|
94
|
-
`;
|
|
95
|
-
|
|
96
|
-
const SRank = styled(Box)`
|
|
97
|
-
width: 35%;
|
|
98
|
-
border-radius: 6px;
|
|
99
|
-
padding: 15px;
|
|
100
|
-
|
|
101
|
-
.rank-title {
|
|
102
|
-
margin-bottom: 6px;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.rank-text {
|
|
106
|
-
margin-right: 8px;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
${mediaQuery.minWidthFourK} {
|
|
110
|
-
border-radius: ${adaptiveValueCalc(6)};
|
|
111
|
-
padding: ${adaptiveValueCalc(15)};
|
|
112
|
-
|
|
113
|
-
.rank-title {
|
|
114
|
-
margin-bottom: ${adaptiveValueCalc(6)};
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.rank-text {
|
|
118
|
-
margin-right: ${adaptiveValueCalc(8)};
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
`;
|
|
122
|
-
|
|
123
|
-
export const PriceRank = ({
|
|
124
|
-
rank,
|
|
125
|
-
latestPriceAmount,
|
|
126
|
-
latestPriceCurrency,
|
|
127
|
-
}: PriceRankProps) => {
|
|
128
|
-
// const { isLoading, converterAmount } = useConvertedValue({
|
|
129
|
-
// latestPriceCurrency,
|
|
130
|
-
// latestPriceAmount,
|
|
131
|
-
// });
|
|
132
|
-
|
|
133
|
-
return (
|
|
134
|
-
<Flex>
|
|
135
|
-
{latestPriceAmount && latestPriceAmount !== 0 && latestPriceCurrency && (
|
|
136
|
-
<SPrice>
|
|
137
|
-
<H6 color={TextGrayColor} className="title-price">
|
|
138
|
-
Price
|
|
139
|
-
</H6>
|
|
140
|
-
<Flex>
|
|
141
|
-
<SPriceFlex alignItems="center">
|
|
142
|
-
{/*<Box*/}
|
|
143
|
-
{/* width={25}*/}
|
|
144
|
-
{/* height={25}*/}
|
|
145
|
-
{/* borderRadius={6}*/}
|
|
146
|
-
{/* style={{*/}
|
|
147
|
-
{/* background: `url(/assetPage/blockchains/square/${blockchain}.svg) no-repeat`,*/}
|
|
148
|
-
{/* backgroundSize: 'cover',*/}
|
|
149
|
-
{/* }}*/}
|
|
150
|
-
{/*/>*/}
|
|
151
|
-
<H2 color={BlackColor} className="price-latest">
|
|
152
|
-
{latestPriceAmount}
|
|
153
|
-
</H2>
|
|
154
|
-
{/*{converterAmount > 0 && (*/}
|
|
155
|
-
{/* <H5 mb={0} color={TextGrayColor}>*/}
|
|
156
|
-
{/* {isLoading ? (*/}
|
|
157
|
-
{/* <Skeleton height="20px" width="40px" />*/}
|
|
158
|
-
{/* ) : (*/}
|
|
159
|
-
{/* `~$` + converterAmount*/}
|
|
160
|
-
{/* )}*/}
|
|
161
|
-
{/* </H5>*/}
|
|
162
|
-
{/*)}*/}
|
|
163
|
-
</SPriceFlex>
|
|
164
|
-
</Flex>
|
|
165
|
-
</SPrice>
|
|
166
|
-
)}
|
|
167
|
-
<SRank backgroundColor={WhiteColor}>
|
|
168
|
-
<H6 color={TextGrayColor} className="rank-title">
|
|
169
|
-
Ludo Rank
|
|
170
|
-
</H6>
|
|
171
|
-
<Flex>
|
|
172
|
-
<SPriceFlex alignItems="center">
|
|
173
|
-
{rank ? (
|
|
174
|
-
<>
|
|
175
|
-
<H2 color={BlackColor} className="rank-text">
|
|
176
|
-
{rank}
|
|
177
|
-
</H2>
|
|
178
|
-
<RangeContainer>
|
|
179
|
-
<RangeValue rankValue={rank} style={{ width: `${rank}%` }} />
|
|
180
|
-
</RangeContainer>
|
|
181
|
-
</>
|
|
182
|
-
) : (
|
|
183
|
-
<H3 color={BlackColor} className="rank-text">
|
|
184
|
-
unknown
|
|
185
|
-
</H3>
|
|
186
|
-
)}
|
|
187
|
-
</SPriceFlex>
|
|
188
|
-
</Flex>
|
|
189
|
-
</SRank>
|
|
190
|
-
</Flex>
|
|
191
|
-
);
|
|
192
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
|
|
5
|
-
import { assetSchema as schema } from '@ludo.ninja/api';
|
|
6
|
-
import { adaptiveValueCalc } from '@ludo.ninja/ui/build/utils/4k';
|
|
7
|
-
|
|
8
|
-
import { mediaQuery } from '@/styles/ScreenWidth';
|
|
9
|
-
import { BorderColorLight, TextGrayColor } from '@/styles/colors';
|
|
10
|
-
|
|
11
|
-
import { Flex, H5, H6 } from '@system';
|
|
12
|
-
|
|
13
|
-
type PropertiesProps = Pick<schema.IAsset, 'attributes'>;
|
|
14
|
-
|
|
15
|
-
const Wrapper = styled.div`
|
|
16
|
-
display: grid;
|
|
17
|
-
grid-template-columns: 1fr 1fr;
|
|
18
|
-
gap: 15px;
|
|
19
|
-
|
|
20
|
-
${mediaQuery.tablet} {
|
|
21
|
-
gap: 10px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
${mediaQuery.minWidthFourK} {
|
|
25
|
-
gap: ${adaptiveValueCalc(15)};
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
const SFlex = styled(Flex)`
|
|
30
|
-
border-radius: 6px;
|
|
31
|
-
border: 1px solid ${BorderColorLight};
|
|
32
|
-
padding: 10px 16px;
|
|
33
|
-
|
|
34
|
-
${mediaQuery.minWidthFourK} {
|
|
35
|
-
border-radius: ${adaptiveValueCalc(6)};
|
|
36
|
-
border: ${adaptiveValueCalc(1)} solid ${BorderColorLight};
|
|
37
|
-
padding: ${adaptiveValueCalc(10)} ${adaptiveValueCalc(16)};
|
|
38
|
-
}
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
|
-
export const Properties = ({ attributes }: PropertiesProps) => {
|
|
42
|
-
return (
|
|
43
|
-
<Wrapper>
|
|
44
|
-
{attributes?.map((item) => {
|
|
45
|
-
return (
|
|
46
|
-
<SFlex flexDirection="column" key={item?.name}>
|
|
47
|
-
<H6 style={{ wordBreak: 'break-word' }} color={TextGrayColor}>
|
|
48
|
-
{item?.name}
|
|
49
|
-
</H6>
|
|
50
|
-
<H5 style={{ wordBreak: 'break-word' }}>{item?.value}</H5>
|
|
51
|
-
</SFlex>
|
|
52
|
-
);
|
|
53
|
-
})}
|
|
54
|
-
</Wrapper>
|
|
55
|
-
);
|
|
56
|
-
};
|