Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

feature(web): Clicking an image in the preview modal will open it in a new tab (#159)

Caric0aa6d5e7339
diff --git a/apps/web/components/dashboard/preview/AssetContentSection.tsx b/apps/web/components/dashboard/preview/AssetContentSection.tsx
index 94bd16ce..4d6bb976 100644
--- a/apps/web/components/dashboard/preview/AssetContentSection.tsx
+++ b/apps/web/components/dashboard/preview/AssetContentSection.tsx
@@ -1,4 +1,5 @@
import Image from "next/image";
+import Link from "next/link";
import type { ZBookmark } from "@hoarder/shared/types/bookmarks";
@@ -11,12 +12,17 @@ export function AssetContentSection({ bookmark }: { bookmark: ZBookmark }) {
case "image": {
return (
<div className="relative h-full min-w-full">
- <Image
- alt="asset"
- fill={true}
- className="object-contain"
- src={`/api/assets/${bookmark.content.assetId}`}
- />
+ <Link
+ href={`/api/assets/${bookmark.content.assetId}`}
+ target="_blank"
+ >
+ <Image
+ alt="asset"
+ fill={true}
+ className="object-contain"
+ src={`/api/assets/${bookmark.content.assetId}`}
+ />
+ </Link>
</div>
);
}