Add description to files that aren't video or images

This commit is contained in:
Lee 2022-11-17 07:19:17 +00:00
parent c9d3e0f8f6
commit b6c6b1fc5f
No known key found for this signature in database
GPG Key ID: 6EA25896ECCB3121

@ -56,6 +56,9 @@ export default function File({ isValidFile, fileData }) {
if (!isValidFile) {
openGraph.description = "This file was not found, is this correct id?";
}
if (!isVideo && !isImage) {
openGraph.description = "Click to open and download this file";
}
if (imageOrVideo) {
openGraph = Object.assign(openGraph, imageOrVideo);
}