chore: translate lastFM strings

This commit is contained in:
GivFNZ 2025-03-21 22:40:39 -03:00
parent 13ad6645f0
commit 3c60045dd6
No known key found for this signature in database
GPG Key ID: 63DD92181B575322
3 changed files with 14 additions and 5 deletions

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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 (
<MainContainer>
<h1>My Last FM Status</h1>
<h2>Check my last played song!</h2>
<h1>{t("myLast")}</h1>
<h2>{t("myLastDescription")}</h2>
<Paragraph>{lastResponse?.recenttracks?.track[0].name} - {lastResponse?.recenttracks?.track[0].artist["#text"]}</Paragraph>
<a href={lastResponse?.recenttracks?.track[0].url}>Check this song on LastFM</a>
<a href={lastResponse?.recenttracks?.track[0].url}>{t("lastLink")}</a>
</MainContainer>
)
}