From 4402e6f04170cbb0613d35fe94471162253e91b2 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Fri, 19 Apr 2024 20:01:51 +0100
Subject: feature: Download images and screenshots

---
 apps/web/components/dashboard/bookmarks/AssetCard.tsx | 7 ++++---
 1 file changed, 4 insertions(+), 3 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 c9a43575..40f435de 100644
--- a/apps/web/components/dashboard/bookmarks/AssetCard.tsx
+++ b/apps/web/components/dashboard/bookmarks/AssetCard.tsx
@@ -1,13 +1,14 @@
 "use client";
 
 import Image from "next/image";
-import { isBookmarkStillTagging } from "@/lib/bookmarkUtils";
 import { api } from "@/lib/trpc";
 
 import type {
   ZBookmark,
   ZBookmarkTypeAsset,
 } from "@hoarder/shared/types/bookmarks";
+import { getAssetUrl } from "@hoarder/shared-react/utils/assetUtils";
+import { isBookmarkStillTagging } from "@hoarder/shared-react/utils/bookmarkUtils";
 
 import { BookmarkLayoutAdaptingCard } from "./BookmarkLayoutAdaptingCard";
 
@@ -24,7 +25,7 @@ function AssetImage({
       return (
         <Image
           alt="asset"
-          src={`/api/assets/${bookmarkedAsset.assetId}`}
+          src={getAssetUrl(bookmarkedAsset.assetId)}
           fill={true}
           className={className}
         />
@@ -35,7 +36,7 @@ function AssetImage({
         <iframe
           title={bookmarkedAsset.assetId}
           className={className}
-          src={`/api/assets/${bookmarkedAsset.assetId}`}
+          src={getAssetUrl(bookmarkedAsset.assetId)}
         />
       );
     }
-- 
cgit v1.2.3-70-g09d2

