wrap file component in anchor tag for file serving

This commit is contained in:
grngxd 2025-06-08 15:10:49 +01:00
parent 9fd4ab4e46
commit 7d98b15780

View file

@ -19,6 +19,7 @@ const formatSize = (bytes: number) => {
export default component$(({ file }: FileProps) => {
return (
<a href={`/api/${file.ID}`} target="_blank">
<div class="rounded-xl bg-neutral-900 flex flex-col overflow-hidden">
{ file.Base64 && (file.ID.endsWith(".png") || file.ID.endsWith(".jpg") || file.ID.endsWith(".jpeg")) && (
<img
@ -40,5 +41,6 @@ export default component$(({ file }: FileProps) => {
</div>
</div>
</div>
</a>
)
})