diff --git a/src/locales/en-us.json b/src/locales/en-us.json index bf88d56..cbb11f8 100644 --- a/src/locales/en-us.json +++ b/src/locales/en-us.json @@ -7,5 +7,8 @@ "welcome": "Hi, I'm Giovani! Welcome to my website!", "skills": "Skills", "projects": "Projects", - "send": "Send" + "send": "Send", + "myLast": "My Last.FM Status", + "myLastDescription": "Take a look on my last played song:", + "lastLink": "Check this song page on Last.FM" } \ No newline at end of file diff --git a/src/locales/pt-br.json b/src/locales/pt-br.json index 9075c13..b51e1ec 100644 --- a/src/locales/pt-br.json +++ b/src/locales/pt-br.json @@ -7,5 +7,8 @@ "welcome": "Olá, eu sou o Giovani! Bem-vindo ao meu site!", "skills": "Habilidades", "projects": "Projetos", - "send": "Enviar" + "send": "Enviar", + "myLast": "Meu status do Last.FM", + "myLastDescription": "Dê uma olhada na música que eu estava ouvindo:", + "lastLink": "Clique aqui para ver a música no Last.FM" } \ No newline at end of file diff --git a/src/pages/music/index.tsx b/src/pages/music/index.tsx index 242e5cb..248e271 100644 --- a/src/pages/music/index.tsx +++ b/src/pages/music/index.tsx @@ -2,18 +2,21 @@ import { getRecentTracks } from "../../api/lastfm"; import { MainContainer } from "../../components/MainContent/styles"; import { useQuery } from '@tanstack/react-query' import { Paragraph } from "../../components/Paragraph/styles"; +import { useTranslation } from "react-i18next"; + export default function Music() { + const { t } = useTranslation() const { data: lastResponse } = useQuery({ queryKey: ['song'], queryFn: getRecentTracks }) return ( -

My Last FM Status

-

Check my last played song!

+

{t("myLast")}

+

{t("myLastDescription")}

{lastResponse?.recenttracks?.track[0].name} - {lastResponse?.recenttracks?.track[0].artist["#text"]} - Check this song on LastFM + {t("lastLink")}
) } \ No newline at end of file