Skip to content

Commit 8c7c1ec

Browse files
committed
update translation functions
1 parent 78ff086 commit 8c7c1ec

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/components/Leaderboard.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ import {
1010
List,
1111
ListItem,
1212
} from "@chakra-ui/react"
13+
import { useTranslation } from "gatsby-plugin-react-i18next"
14+
1315
import Emoji from "./Emoji"
1416
import Link from "./Link"
15-
1617
import Translation from "./Translation"
17-
import { translateMessageId } from "../utils/translations"
18-
import { useIntl } from "react-intl"
1918

2019
const githubUrl = `https://github.com/`
2120

@@ -44,18 +43,15 @@ const Leaderboard: React.FC<IProps> = ({ content, limit = 100 }) => {
4443
}
4544
)
4645

47-
const intl = useIntl()
46+
const { t } = useTranslation()
4847

4948
return (
5049
<List
5150
bgColor="background"
5251
boxShadow={colorModeStyles.listBoxShadow}
5352
w="100%"
5453
mb={8}
55-
aria-label={translateMessageId(
56-
"page-upgrades-bug-bounty-leaderboard-list",
57-
intl
58-
)}
54+
aria-label={t("page-upgrades-bug-bounty-leaderboard-list")}
5955
>
6056
{content
6157
.filter((_, idx) => idx < limit)

0 commit comments

Comments
 (0)