Skip to content

Commit 04f6e8b

Browse files
committed
Forgot to add Image back
1 parent 4cdbadc commit 04f6e8b

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

apps/dashboard/src/app/(dashboard)/project-showcase/[slug]/page.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ExternalLink, FileText } from "lucide-react";
2+
import Image from "next/image";
23
import Link from "next/link";
34
import { Badge } from "../../../../@/components/ui/badge";
45
import { Button } from "../../../../@/components/ui/button";
@@ -9,6 +10,8 @@ import {
910
CardHeader,
1011
CardTitle,
1112
} from "../../../../@/components/ui/card";
13+
import { getThirdwebClient } from "../../../../@/constants/thirdweb.server";
14+
import { resolveSchemeWithErrorHandler } from "../../../../@/lib/resolveSchemeWithErrorHandler";
1215
import { PROJECT_SHOWCASE_DATA } from "../../../../lib/project-showcase-constants";
1316

1417
export default async function DetailPage({
@@ -69,20 +72,20 @@ export default async function DetailPage({
6972
</div>
7073
<div className="md:w-1/2">
7174
<div className="relative aspect-video h-full w-full md:aspect-square">
72-
{/* <Image
75+
<Image
7376
src={
7477
project.image?.startsWith("ipfs://")
75-
? ((await resolveSchemeWithErrorHandler({
76-
client: thirdwebClient,
78+
? (resolveSchemeWithErrorHandler({
79+
client: getThirdwebClient(),
7780
uri: project.image,
78-
})) ?? "")
81+
}) ?? "")
7982
: (project.image ?? "/assets/showcase/default_image.png")
8083
}
8184
alt={`${project.title} Thumbnail`}
8285
width={500}
8386
height={500}
84-
className="rounded-b-lg md:rounded-r-lg md:rounded-bl-none object-cover"
85-
/> */}
87+
className="rounded-b-lg object-cover md:rounded-r-lg md:rounded-bl-none"
88+
/>
8689
</div>
8790
</div>
8891
</div>

apps/dashboard/src/app/(dashboard)/project-showcase/page.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Metadata } from "next";
2+
import Image from "next/image";
23
import Link from "next/link";
34
import { Badge } from "../../../@/components/ui/badge";
45
import {
@@ -16,6 +17,8 @@ import {
1617
PaginationNext,
1718
PaginationPrevious,
1819
} from "../../../@/components/ui/pagination";
20+
import { getThirdwebClient } from "../../../@/constants/thirdweb.server";
21+
import { resolveSchemeWithErrorHandler } from "../../../@/lib/resolveSchemeWithErrorHandler";
1922
import {
2023
PROJECT_SHOWCASE_DATA,
2124
PROJECT_SHOWCASE_INDUSTRIES,
@@ -94,13 +97,21 @@ export default function ProjectShowcasePage({
9497
className="block"
9598
>
9699
<Card className="flex h-full cursor-pointer flex-col overflow-hidden transition-shadow hover:shadow-lg">
97-
{/* <Image
98-
src={project.image ?? "/assets/showcase/default_image.png"}
100+
<Image
101+
src={
102+
project.image?.startsWith("ipfs://")
103+
? (resolveSchemeWithErrorHandler({
104+
client: getThirdwebClient(),
105+
uri: project.image,
106+
}) ?? "")
107+
: (project.image ??
108+
"/assets/showcase/default_image.png")
109+
}
99110
alt={project.title}
100111
width={300}
101112
height={200}
102113
className="h-48 w-full object-cover"
103-
/> */}
114+
/>
104115
<CardHeader>
105116
<CardTitle className="mb-3">{project.title}</CardTitle>
106117
<CardDescription>{project.description}</CardDescription>

0 commit comments

Comments
 (0)