diff options
| author | Cari <44416326+lilacpixel@users.noreply.github.com> | 2024-05-16 17:56:37 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-16 22:56:37 +0100 |
| commit | c0aa6d5e7339e27d159a9ab4da0965fb4c05df39 (patch) | |
| tree | eaa6f08df80655fdffa81c7863b4980836264391 /apps | |
| parent | 747efa545d88053e199d3271710b526be0dd3b2b (diff) | |
| download | karakeep-c0aa6d5e7339e27d159a9ab4da0965fb4c05df39.tar.zst | |
feature(web): Clicking an image in the preview modal will open it in a new tab (#159)
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/web/components/dashboard/preview/AssetContentSection.tsx | 18 |
1 files changed, 12 insertions, 6 deletions
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> ); } |
