Skip to content

Commit 03fc449

Browse files
committed
fix search images
1 parent b3d4d3a commit 03fc449

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.mise.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tools]
2+
node = "16"

next.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ module.exports = {
77
},
88
images: {
99
remotePatterns: [
10+
{
11+
protocol: "https",
12+
hostname: "i.dummyjson.com",
13+
pathname: "/**",
14+
},
15+
1016
{
1117
protocol: "https",
1218
hostname: "cdn.dummyjson.com",

src/components/Hits.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function Hits({ setSearch }) {
2828
return (
2929
<div
3030
key={product.id}
31-
className="list-group-item list-group-item-action border-0 ripple row d-flex align-items-center"
31+
className="border-0 list-group-item list-group-item-action ripple row d-flex align-items-center"
3232
// aria-current="true"
3333
style={{
3434
borderRadius: "0",
@@ -40,7 +40,7 @@ export default function Hits({ setSearch }) {
4040
onClick={handleClick.bind(product.id)}
4141
>
4242
<Image
43-
src={product?.thumbnail}
43+
src={`https://cdn.dummyjson.com/product-images/${product?.id}/thumbnail.jpg`}
4444
alt={product?.title}
4545
width={70}
4646
height={80}

0 commit comments

Comments
 (0)