import { useEffect } from "react"
export default function Component() {
useEffect(() => {
document.body.style.opacity = "0"
document.body.style.transition = "opacity 0.3s ease"
const params = new URLSearchParams(window.location.search)
const arquivo = params.get("arquivo")
if (arquivo) {
const botoes = document.querySelectorAll("a, button")
botoes.forEach(btn => {
if (btn.innerText.toLowerCase().includes("download")) {
btn.href = decodeURIComponent(arquivo)
btn.setAttribute("download", "")
}
})
}
requestAnimationFrame(() => {
document.body.style.opacity = "1"
})
}, [])
return <></>
}