Skip to content

Commit bdb7110

Browse files
author
Rajat
committed
codex issue resolved
1 parent 9021819 commit bdb7110

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

apps/web/components/community/index.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -746,14 +746,16 @@ export function CommunityForum({
746746
onContextMenu={(e) => e.preventDefault()}
747747
></iframe>
748748
<div className="absolute top-2 right-2 flex gap-2 opacity-0 group-hover:opacity-100 transition-opacity z-20">
749-
<a
750-
href={`/api/media/${encodeURIComponent(media.media!.mediaId)}`}
751-
onClick={(e) => e.stopPropagation()}
752-
className="rounded-md bg-black/60 text-white p-1.5 hover:bg-black/80"
753-
aria-label="Download"
754-
>
755-
<Download className="h-4 w-4" />
756-
</a>
749+
{media.media?.mediaId && (
750+
<a
751+
href={`/api/media/${encodeURIComponent(media.media.mediaId)}`}
752+
onClick={(e) => e.stopPropagation()}
753+
className="rounded-md bg-black/60 text-white p-1.5 hover:bg-black/80"
754+
aria-label="Download"
755+
>
756+
<Download className="h-4 w-4" />
757+
</a>
758+
)}
757759
<button
758760
type="button"
759761
onClick={(e) => {

0 commit comments

Comments
 (0)