Skip to content

Commit e984ca0

Browse files
committed
Convert OldEmoji to new Emoji component
1 parent cec329d commit e984ca0

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

src/components/TranslationLeaderboard.tsx

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
// Libraries
22
import React, { useState } from "react"
3-
import styled from "@emotion/styled"
43
import { reverse, sortBy } from "lodash"
54

65
// Components
7-
import Emoji from "./OldEmoji"
6+
import Emoji from "./Emoji"
87
import { Option, OptionContainer, OptionText } from "./SharedStyledComponents"
98
import Translation from "./Translation"
109
import { Box, Flex, Img, Text, useColorModeValue } from "@chakra-ui/react"
1110

12-
const StyledEmoji = styled(Emoji)`
13-
display: block;
14-
15-
@media (max-width: ${(props) => props.theme.breakpoints.s}) {
16-
display: none;
17-
}
18-
`
19-
2011
export interface IProps {
2112
monthData: any
2213
quarterData: any
@@ -160,7 +151,7 @@ const TranslationLeaderboard: React.FC<IProps> = ({
160151
<Flex>
161152
{emoji ? (
162153
<Box w={10}>
163-
<Emoji mr={"1rem"} size={2} text={emoji} />
154+
<Emoji mr={4} fontSize="2rem" text={emoji} />
164155
</Box>
165156
) : (
166157
<Box w={10} opacity="0.4">
@@ -178,7 +169,7 @@ const TranslationLeaderboard: React.FC<IProps> = ({
178169
h={{ base: "30px", sm: 10 }}
179170
w={{ base: "30px", sm: 10 }}
180171
borderRadius="50%"
181-
display={{ base: "none", sm: "block" }}
172+
display={{ base: "none", s: "block" }}
182173
src={user.avatarUrl}
183174
/>
184175
<Box maxW={{ base: "100px", sm: "none" }}>
@@ -190,7 +181,12 @@ const TranslationLeaderboard: React.FC<IProps> = ({
190181
</Flex>
191182
</Flex>
192183
<Flex minW="20%" flexDirection="row" alignItems="left">
193-
<StyledEmoji mr={"0.5rem"} size={1.5} text={":writing:"} />
184+
<Emoji
185+
display={{ base: "none", sm: "block" }}
186+
mr={2}
187+
fontSize="2xl"
188+
text={":writing:"}
189+
/>
194190
{user.totalCosts}
195191
</Flex>
196192
</Flex>

0 commit comments

Comments
 (0)