|
| 1 | +import { FileText } from "lucide-react"; |
1 | 2 | import type { Metadata } from "next"; |
2 | 3 | import Image from "next/image"; |
3 | 4 | import Link from "next/link"; |
4 | 5 | import { Badge } from "../../@/components/ui/badge"; |
| 6 | +import { Button } from "../../@/components/ui/button"; |
5 | 7 | import { |
6 | 8 | Card, |
7 | 9 | CardContent, |
@@ -127,43 +129,57 @@ export default function ProjectShowcasePage({ |
127 | 129 | </div> |
128 | 130 | <div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3"> |
129 | 131 | {paginatedProjects.map((project) => ( |
130 | | - <Link |
131 | | - key={project.id} |
132 | | - href={`/project-showcase/${project.slug}`} |
133 | | - className="block" |
134 | | - > |
| 132 | + <div key={project.id} className="block"> |
135 | 133 | <Card className="flex h-full cursor-pointer flex-col overflow-hidden transition-shadow hover:shadow-lg"> |
136 | | - {/* eslint-disable @next/next/no-img-element */} |
137 | | - <img |
138 | | - src={ |
139 | | - project.image?.startsWith("ipfs://") |
140 | | - ? (resolveSchemeWithErrorHandler({ |
141 | | - client: getThirdwebClient(), |
142 | | - uri: project.image, |
143 | | - }) ?? "") |
144 | | - : (project.image ?? |
145 | | - "/assets/showcase/default_image.png") |
146 | | - } |
147 | | - alt={project.title} |
148 | | - width={300} |
149 | | - height={200} |
150 | | - className="h-48 w-full object-cover" |
151 | | - /> |
152 | | - <CardHeader> |
153 | | - <CardTitle className="mb-3">{project.title}</CardTitle> |
154 | | - <CardDescription>{project.description}</CardDescription> |
155 | | - </CardHeader> |
156 | | - <CardContent className="flex-grow"> |
157 | | - <div className="flex flex-wrap gap-2"> |
158 | | - {project.industries?.map((industry) => ( |
159 | | - <Badge key={industry} variant="secondary"> |
160 | | - {industry} |
161 | | - </Badge> |
162 | | - ))} |
| 134 | + <Link |
| 135 | + href={`/project-showcase/${project.slug}`} |
| 136 | + className="flex-grow" |
| 137 | + > |
| 138 | + {/* eslint-disable @next/next/no-img-element */} |
| 139 | + <img |
| 140 | + src={ |
| 141 | + project.image?.startsWith("ipfs://") |
| 142 | + ? (resolveSchemeWithErrorHandler({ |
| 143 | + client: getThirdwebClient(), |
| 144 | + uri: project.image, |
| 145 | + }) ?? "") |
| 146 | + : (project.image ?? |
| 147 | + "/assets/showcase/default_image.png") |
| 148 | + } |
| 149 | + alt={project.title} |
| 150 | + width={300} |
| 151 | + height={200} |
| 152 | + className="h-48 w-full object-cover" |
| 153 | + /> |
| 154 | + <CardHeader> |
| 155 | + <CardTitle className="mb-3">{project.title}</CardTitle> |
| 156 | + <CardDescription>{project.description}</CardDescription> |
| 157 | + </CardHeader> |
| 158 | + </Link> |
| 159 | + <CardContent> |
| 160 | + <div className="flex items-center justify-between"> |
| 161 | + <div className="flex flex-wrap gap-2"> |
| 162 | + {project.industries?.map((industry) => ( |
| 163 | + <Badge key={industry} variant="secondary"> |
| 164 | + {industry} |
| 165 | + </Badge> |
| 166 | + ))} |
| 167 | + </div> |
| 168 | + {project.case_study && ( |
| 169 | + <Link |
| 170 | + href={project.case_study} |
| 171 | + target="_blank" |
| 172 | + // onClick={(e) => e.stopPropagation()} |
| 173 | + > |
| 174 | + <Button variant="outline" size="sm"> |
| 175 | + <FileText className="mr-2 h-4 w-4" /> Case Study |
| 176 | + </Button> |
| 177 | + </Link> |
| 178 | + )} |
163 | 179 | </div> |
164 | 180 | </CardContent> |
165 | 181 | </Card> |
166 | | - </Link> |
| 182 | + </div> |
167 | 183 | ))} |
168 | 184 | </div> |
169 | 185 | <div className="mt-8 flex flex-col items-center"> |
|
0 commit comments