Commit 3c58178 1 parent ab56d2f commit 3c58178 Copy full SHA for 3c58178
File tree 2 files changed +18
-10
lines changed
2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import type { Report } from "@/types";
11
11
import parse from "html-react-parser" ;
12
12
import { ChevronLeft , MapPin } from "lucide-react" ;
13
13
import type { Metadata } from "next" ;
14
+ import Image from "next/image" ;
14
15
import Link from "next/link" ;
15
16
16
17
interface ReportPageProps {
@@ -114,11 +115,14 @@ export default async function ReportPage({ params }: ReportPageProps) {
114
115
< h3 className = "font-bold text-2xl pb-3" > Summary</ h3 >
115
116
< p className = "text-wrap leading-relaxed" > { report . summary } </ p >
116
117
</ div >
117
- < img
118
- src = { report . image }
119
- alt = "Report illustration"
120
- className = "rounded-2xl md:h-[420px] md:object-cover md:w-full"
121
- />
118
+ < div className = "relative rounded-2xl md:h-[420px] h-[358px] w-full overflow-hidden" >
119
+ < Image
120
+ src = { report . image }
121
+ alt = "Report illustration"
122
+ className = "-z-10 object-cover bg-center"
123
+ fill
124
+ />
125
+ </ div >
122
126
{ htmlParsedStory && (
123
127
< article className = "prose text-vd-blue-900" >
124
128
{ htmlParsedStory }
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
12
12
} from "@/lib/search-filter-utils" ;
13
13
import type { ISortingOption , Report } from "@/types" ;
14
14
import Fuse from "fuse.js" ;
15
+ import Image from "next/image" ;
15
16
import { useCallback , useMemo , useState } from "react" ;
16
17
import { ShowingDisplay , VDPaginator } from "../global/vd-paginator" ;
17
18
import { SidebarFilter } from "./filter-sidebar" ;
@@ -130,11 +131,14 @@ export function ReportsView({ reports }: IPageData) {
130
131
) : (
131
132
< section className = "w-full flex justify-center items-center py-6" >
132
133
< div className = "flex flex-col items-center text-center pb-24 md:pb-10" >
133
- < img
134
- className = "h-20 w-20"
135
- src = "/reports_not_found.svg"
136
- alt = "flower illustration"
137
- />
134
+ < div className = "h-20 w-20" >
135
+ < Image
136
+ src = "/reports_not_found.svg"
137
+ alt = "flower illustration"
138
+ height = { 20 }
139
+ width = { 20 }
140
+ />
141
+ </ div >
138
142
< p className = "text-lg font-bold text-vd-beige-600" >
139
143
We couldn't find any reports matching your search or filter.
140
144
</ p >
You can’t perform that action at this time.
0 commit comments