@@ -7,22 +7,7 @@ import { reverse, sortBy } from "lodash"
7
7
import Emoji from "./OldEmoji"
8
8
import { Option , OptionContainer , OptionText } from "./SharedStyledComponents"
9
9
import Translation from "./Translation"
10
- import { Box , Flex , Img , useColorModeValue } from "@chakra-ui/react"
11
-
12
- const Width40 = styled . div `
13
- width: 40px;
14
- `
15
-
16
- const ItemNumber = styled ( Width40 ) `
17
- opacity: 0.4;
18
- `
19
-
20
- const Language = styled . p `
21
- margin: 0;
22
- display: block;
23
- font-size: ${ ( props ) => props . theme . fontSizes . s } ;
24
- opacity: 0.6;
25
- `
10
+ import { Box , Flex , Img , Text , useColorModeValue } from "@chakra-ui/react"
26
11
27
12
const StyledEmoji = styled ( Emoji ) `
28
13
display: block;
@@ -108,7 +93,9 @@ const TranslationLeaderboard: React.FC<IProps> = ({
108
93
w = "full"
109
94
>
110
95
< Flex >
111
- < ItemNumber > #</ ItemNumber >
96
+ < Box w = { 10 } opacity = "0.4" >
97
+ #
98
+ </ Box >
112
99
< Flex
113
100
flexDirection = "row"
114
101
alignItems = "center"
@@ -172,11 +159,13 @@ const TranslationLeaderboard: React.FC<IProps> = ({
172
159
>
173
160
< Flex >
174
161
{ emoji ? (
175
- < Width40 >
162
+ < Box w = { 10 } >
176
163
< Emoji mr = { "1rem" } size = { 2 } text = { emoji } />
177
- </ Width40 >
164
+ </ Box >
178
165
) : (
179
- < ItemNumber > { idx + 1 } </ ItemNumber >
166
+ < Box w = { 10 } opacity = "0.4" >
167
+ { idx + 1 }
168
+ </ Box >
180
169
) }
181
170
< Flex
182
171
flexDirection = "row"
@@ -194,7 +183,9 @@ const TranslationLeaderboard: React.FC<IProps> = ({
194
183
/>
195
184
< Box maxW = { { base : "100px" , sm : "none" } } >
196
185
{ user . username }
197
- < Language > { sortedLanguages [ 0 ] . language . name } </ Language >
186
+ < Text m = { 0 } display = "block" fontSize = "sm" opacity = "0.6" >
187
+ { sortedLanguages [ 0 ] . language . name }
188
+ </ Text >
198
189
</ Box >
199
190
</ Flex >
200
191
</ Flex >
0 commit comments