Skip to content

Commit

Permalink
feature: Clicking preview for image assets brings up the details modal (
Browse files Browse the repository at this point in the history
  • Loading branch information
lilacpixel authored May 10, 2024
1 parent 1e317d9 commit cbc8dde
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions apps/web/components/dashboard/bookmarks/AssetCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use client";

import Image from "next/image";
import Link from "next/link";
import { api } from "@/lib/trpc";

import type {
Expand All @@ -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": {
Expand Down

0 comments on commit cbc8dde

Please sign in to comment.