diff --git a/next.config.js b/next.config.js index 886870c1b02..1aa0317271f 100644 --- a/next.config.js +++ b/next.config.js @@ -63,6 +63,12 @@ module.exports = (phase, { defaultConfig }) => { trailingSlash: true, images: { deviceSizes: [640, 750, 828, 1080, 1200, 1504, 1920], + remotePatterns: [ + { + protocol: "https", + hostname: "crowdin-static.downloads.crowdin.com", + }, + ], }, } diff --git a/src/components/TranslationLeaderboard.tsx b/src/components/TranslationLeaderboard.tsx index 8e1901393aa..64c5715dcc5 100644 --- a/src/components/TranslationLeaderboard.tsx +++ b/src/components/TranslationLeaderboard.tsx @@ -2,78 +2,30 @@ import React, { useState } from "react" import reverse from "lodash/reverse" import sortBy from "lodash/sortBy" import { useTranslation } from "next-i18next" -import { - Box, - Button as ChakraButton, - Flex, - Img, - useColorModeValue, - useRadio, - useRadioGroup, -} from "@chakra-ui/react" import type { CostLeaderboardData } from "@/lib/types" -import Emoji from "./Emoji" -import Text from "./OldText" +import { Button } from "@/components/ui/buttons/Button" +import { Flex } from "@/components/ui/flex" -const Button = (props) => { - return ( - - ) -} +import { cn } from "@/lib/utils/cn" -const RadioCard = (props) => { - const shadow = useColorModeValue("tableBox.light", "tableBox.dark") - const { getInputProps, getCheckboxProps } = useRadio(props) - - const input = getInputProps() - const checkbox = getCheckboxProps() +import Emoji from "./Emoji" +import { TwImage } from "./Image" +const RadioCard = ({ value, children, checked, onChange }) => { return ( ) } @@ -92,12 +44,6 @@ const TranslationLeaderboard = ({ quarterData, allTimeData, }: TranslationLeaderboardProps) => { - const tableBoxShadow = useColorModeValue("tableBox.light", "tableBox.dark") - const tableItemBoxShadow = useColorModeValue( - "tableItemBox.light", - "tableItemBox.dark" - ) - const leaderboardData = { monthData: sortAndFilterData(monthData), quarterData: sortAndFilterData(quarterData), @@ -115,75 +61,52 @@ const TranslationLeaderboard = ({ updateFilterAmount(50) } - const { getRadioProps } = useRadioGroup({ - name: "period selection", - defaultValue: "monthData", - onChange: updateDateRangeType, - }) - const { t } = useTranslation( "page-contributing-translation-program-acknowledgements" ) return ( - - - +
+ + {t( "page-contributing-translation-program-acknowledgements-translation-leaderboard-month-view" )} {t( "page-contributing-translation-program-acknowledgements-translation-leaderboard-quarter-view" )} {t( "page-contributing-translation-program-acknowledgements-translation-leaderboard-all-time-view" )} - - +
+ - - # - - +
#
+ {t( "page-contributing-translation-program-acknowledgements-translator" )}
- + {t( "page-contributing-translation-program-acknowledgements-total-words" )} @@ -204,55 +127,35 @@ const TranslationLeaderboard = ({ } return ( - {emoji ? ( - +
+ {emoji ? ( - - ) : ( - - {idx + 1} - - )} - - - + ) : ( + {idx + 1} + )} +
+ +
+ +
+
{username} - + {langs[0]} - - + +
- + ) })} - - -
+ + -
+
) }