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 11import Link from 'next/link' ;
2-
32import { trimmedStringToLength } from '@/utils/functions/functions' ;
43
54interface ISearchResultProps {
@@ -10,7 +9,6 @@ interface ISearchResultProps {
109 sale_price : string ;
1110 on_sale : boolean ;
1211 short_description : string ;
13- objectID : number ;
1412 slug : string ;
1513 } ;
1614}
@@ -24,7 +22,6 @@ interface ISearchResultProps {
2422 * @param {string } sale_price Price when on sale
2523 * @param {boolean } on_sale Is the product on sale? True or false
2624 * @param {string } short_description Short description of product
27- * @param {number } objectID ID of product
2825 }
2926 */
3027const SearchResults = ( {
@@ -35,7 +32,6 @@ const SearchResults = ({
3532 sale_price,
3633 on_sale,
3734 short_description,
38- objectID,
3935 } ,
4036} : ISearchResultProps ) => {
4137 return (
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ interface Variations {
2323
2424interface RootObject {
2525 __typename : string ;
26- databaseId : number ;
2726 name : string ;
2827 onSale : boolean ;
2928 slug : string ;
@@ -55,7 +54,6 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
5554 { products ? (
5655 products . map (
5756 ( {
58- databaseId,
5957 name,
6058 price,
6159 regularPrice,
@@ -78,9 +76,7 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
7876
7977 return (
8078 < div key = { uuidv4 ( ) } className = "group" >
81- < Link
82- href = { `/produkt/${ encodeURIComponent ( slug ) } ` }
83- >
79+ < Link href = { `/produkt/${ encodeURIComponent ( slug ) } ` } >
8480 < div className = "aspect-[3/4] relative overflow-hidden bg-gray-100" >
8581 { image ? (
8682 < img
@@ -94,14 +90,14 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
9490 id = "product-image"
9591 className = "w-full h-full object-cover object-center transition duration-300 group-hover:scale-105"
9692 alt = { name }
97- src = { process . env . NEXT_PUBLIC_PLACEHOLDER_SMALL_IMAGE_URL }
93+ src = {
94+ process . env . NEXT_PUBLIC_PLACEHOLDER_SMALL_IMAGE_URL
95+ }
9896 />
9997 ) }
10098 </ div >
10199 </ Link >
102- < Link
103- href = { `/produkt/${ encodeURIComponent ( slug ) } ` }
104- >
100+ < Link href = { `/produkt/${ encodeURIComponent ( slug ) } ` } >
105101 < span >
106102 < div className = "mt-4" >
107103 < p className = "text-2xl font-bold text-center cursor-pointer hover:text-gray-600 transition-colors" >
@@ -123,9 +119,7 @@ const DisplayProducts = ({ products }: IDisplayProductsProps) => (
123119 </ span >
124120 </ div >
125121 ) : (
126- < span className = "text-lg text-gray-900" >
127- { price }
128- </ span >
122+ < span className = "text-lg text-gray-900" > { price } </ span >
129123 ) }
130124 </ div >
131125 </ div >
Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ const UserRegistration = () => {
3636 } else {
3737 throw new Error ( 'Failed to register customer' ) ;
3838 }
39- } catch ( err : unknown ) {
40- console . error ( 'Registration error' ) ;
39+ } catch ( error : unknown ) {
40+ console . error ( 'Registration error:' , error ) ;
4141 }
4242 } ;
4343
You can’t perform that action at this time.
0 commit comments