import { useEffect } from "react"

export default function Component() {
  useEffect(() => {
    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", "")
        }
      })
    }
  }, [])

  return <></>
}

Aqui está o seu material!