File tree Expand file tree Collapse file tree 3 files changed +8
-18
lines changed Expand file tree Collapse file tree 3 files changed +8
-18
lines changed Original file line number Diff line number Diff line change 1
1
import Link from 'next/link' ;
2
-
3
2
import { trimmedStringToLength } from '@/utils/functions/functions' ;
4
3
5
4
interface ISearchResultProps {
@@ -10,7 +9,6 @@ interface ISearchResultProps {
10
9
sale_price : string ;
11
10
on_sale : boolean ;
12
11
short_description : string ;
13
- objectID : number ;
14
12
slug : string ;
15
13
} ;
16
14
}
@@ -24,7 +22,6 @@ interface ISearchResultProps {
24
22
* @param {string } sale_price Price when on sale
25
23
* @param {boolean } on_sale Is the product on sale? True or false
26
24
* @param {string } short_description Short description of product
27
- * @param {number } objectID ID of product
28
25
}
29
26
*/
30
27
const SearchResults = ( {
@@ -35,7 +32,6 @@ const SearchResults = ({
35
32
sale_price,
36
33
on_sale,
37
34
short_description,
38
- objectID,
39
35
} ,
40
36
} : ISearchResultProps ) => {
41
37
return (
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ interface Variations {
23
23
24
24
interface RootObject {
25
25
__typename : string ;
26
- databaseId : number ;
27
26
name : string ;
28
27
onSale : boolean ;
29
28
slug : string ;
@@ -55,7 +54,6 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
55
54
{ products ? (
56
55
products . map (
57
56
( {
58
- databaseId,
59
57
name,
60
58
price,
61
59
regularPrice,
@@ -78,9 +76,7 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
78
76
79
77
return (
80
78
< div key = { uuidv4 ( ) } className = "group" >
81
- < Link
82
- href = { `/produkt/${ encodeURIComponent ( slug ) } ` }
83
- >
79
+ < Link href = { `/produkt/${ encodeURIComponent ( slug ) } ` } >
84
80
< div className = "aspect-[3/4] relative overflow-hidden bg-gray-100" >
85
81
{ image ? (
86
82
< img
@@ -94,14 +90,14 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
94
90
id = "product-image"
95
91
className = "w-full h-full object-cover object-center transition duration-300 group-hover:scale-105"
96
92
alt = { name }
97
- src = { process . env . NEXT_PUBLIC_PLACEHOLDER_SMALL_IMAGE_URL }
93
+ src = {
94
+ process . env . NEXT_PUBLIC_PLACEHOLDER_SMALL_IMAGE_URL
95
+ }
98
96
/>
99
97
) }
100
98
</ div >
101
99
</ Link >
102
- < Link
103
- href = { `/produkt/${ encodeURIComponent ( slug ) } ` }
104
- >
100
+ < Link href = { `/produkt/${ encodeURIComponent ( slug ) } ` } >
105
101
< span >
106
102
< div className = "mt-4" >
107
103
< p className = "text-2xl font-bold text-center cursor-pointer hover:text-gray-600 transition-colors" >
@@ -123,9 +119,7 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
123
119
</ span >
124
120
</ div >
125
121
) : (
126
- < span className = "text-lg text-gray-900" >
127
- { price }
128
- </ span >
122
+ < span className = "text-lg text-gray-900" > { price } </ span >
129
123
) }
130
124
</ div >
131
125
</ div >
Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ const UserRegistration = () => {
36
36
} else {
37
37
throw new Error ( 'Failed to register customer' ) ;
38
38
}
39
- } catch ( err : unknown ) {
40
- console . error ( 'Registration error' ) ;
39
+ } catch ( error : unknown ) {
40
+ console . error ( 'Registration error:' , error ) ;
41
41
}
42
42
} ;
43
43
You can’t perform that action at this time.
0 commit comments