From cbc8dded9970121d003fdcfb71099308acd4f09f Mon Sep 17 00:00:00 2001
From: Cari <44416326+lilacpixel@users.noreply.github.com>
Date: Fri, 10 May 2024 16:10:46 -0400
Subject: feature: Clicking preview for image assets brings up the details
 modal (#147)

---
 apps/web/components/dashboard/bookmarks/AssetCard.tsx | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

(limited to 'apps/web/components/dashboard/bookmarks/AssetCard.tsx')

diff --git a/apps/web/components/dashboard/bookmarks/AssetCard.tsx b/apps/web/components/dashboard/bookmarks/AssetCard.tsx
index 40f435de..f110e0c4 100644
--- a/apps/web/components/dashboard/bookmarks/AssetCard.tsx
+++ b/apps/web/components/dashboard/bookmarks/AssetCard.tsx
@@ -1,6 +1,7 @@
 "use client";
 
 import Image from "next/image";
+import Link from "next/link";
 import { api } from "@/lib/trpc";
 
 import type {
@@ -23,12 +24,14 @@ function AssetImage({
   switch (bookmarkedAsset.assetType) {
     case "image": {
       return (
-        <Image
-          alt="asset"
-          src={getAssetUrl(bookmarkedAsset.assetId)}
-          fill={true}
-          className={className}
-        />
+        <Link href={`/dashboard/preview/${bookmark.id}`}>
+          <Image
+            alt="asset"
+            src={getAssetUrl(bookmarkedAsset.assetId)}
+            fill={true}
+            className={className}
+          />
+        </Link>
       );
     }
     case "pdf": {
-- 
cgit v1.2.3-70-g09d2

