import React, { useState } from "react";
import DownloadLink from "./DownloadLink";
import * as Utils from "../utils";
import LinkInput from "./LinkInput";
function Metadata({ permalink, openFileExplorer, fileName, hash }) {
const [showLink, setShowLink] = useState(false);
async function report(e) {
e.preventDefault();
try {
await fetch(`https://api.webamp.org/skins/${hash}/report`, {
method: "POST",
mode: "cors",
});
} catch (e) {
alert("Oops. Something went wrong. Please try again later.");
return;
}
alert("Thanks for reporting. We'll review this skin.");
}
const elements = [