@correlucas
Posted
👾Fala Gabriel, tudo bem? Parabéns pelo desafio!
Acabei de ver sua solução e tenho umas dicas pra você.
Evite usar id
no seu código, deixe pra usar id
só quando seu código tiver um formulário ou JS. Pra estilizar o código use sempre classes ou o seletor direto de cada item.
O seu component está perfeito, mas se você quiser melhorar ainda mais, você pode usar a tag <picture>
para simplificar seu código e segurar as duas imagens dentro do html. Usando essa tag, você nem precisará de media query
pra mudar de uma imagem pra outra dependendo do dispositivo (mobile ou desktop), basta configurar tudo dentro do html.
Caso você ainda não conheça essa tag, aqui na documentação explica certinho como configurá-la:
https://www.w3schools.com/tags/tag_picture.asp
👋 Espero ter ajudado e continue no foco!