@@ -16,12 +16,9 @@ const MapMarkerPopup = ({ seller }: { seller: any }) => {
16
16
? seller . image
17
17
: '/images/logo.svg' ;
18
18
19
- const truncateChars = ( text : string , maxChars : number ) : string => {
20
- return text . length > maxChars ? text . slice ( 0 , maxChars ) + '...' : text ;
21
- } ;
22
-
23
-
24
-
19
+ const truncateChars = ( text : string , maxChars : number ) : string => {
20
+ return text . length > maxChars ? text . slice ( 0 , maxChars ) + '...' : text ;
21
+ } ;
25
22
26
23
const translateSellerCategory = ( category : string ) : string => {
27
24
switch ( category ) {
@@ -42,45 +39,41 @@ const MapMarkerPopup = ({ seller }: { seller: any }) => {
42
39
< div style = { { position : 'relative' , zIndex : 20 , padding : '10px' } } >
43
40
{ /* Seller name and type - Close with a small gap */ }
44
41
< div style = { { textAlign : 'center' , marginBottom : '5px' } } >
45
- < h2
46
- style = { {
47
- fontWeight : 'bold' ,
48
- fontSize : '15px' ,
49
- marginBottom : '2px' ,
50
- whiteSpace : 'nowrap' ,
51
- overflow : 'hidden' ,
52
- textOverflow : 'ellipsis' ,
53
- } }
54
- >
55
- { truncateChars ( seller . name , 12 ) } { /* Adjust limit as needed */ }
56
- </ h2 >
57
-
58
-
42
+ < h2
43
+ style = { {
44
+ fontWeight : 'bold' ,
45
+ fontSize : '15px' ,
46
+ marginBottom : '2px' ,
47
+ whiteSpace : 'nowrap' ,
48
+ overflow : 'hidden' ,
49
+ textOverflow : 'ellipsis' ,
50
+ } }
51
+ >
52
+ { truncateChars ( seller . name , 12 ) } { /* Adjust limit as needed */ }
53
+ </ h2 >
59
54
60
55
{ seller . seller_type && (
61
- < p style = { { fontSize : '14px' , color : '#6B7280' , marginTop : '0px' , marginBottom : '4px' } } >
62
- { translateSellerCategory ( seller . seller_type ) }
63
- </ p >
56
+ < p style = { { fontSize : '14px' , color : '#6B7280' , marginTop : '0px' , marginBottom : '4px' } } >
57
+ { translateSellerCategory ( seller . seller_type ) }
58
+ </ p >
64
59
65
60
) }
66
61
</ div >
67
62
68
63
{ /* Seller image - Close to seller type */ }
69
64
< div style = { { width : '150px' , height : '70px' , overflow : 'hidden' , margin : '0 auto' , display : 'flex' , justifyContent : 'center' , alignItems : 'center' } } >
70
- < Image
71
- src = { imageUrl }
72
- alt = "Seller Image"
73
- width = { imageUrl === '/images/logo.svg' ? 80 : 150 }
74
- height = { imageUrl === '/images/logo.svg' ? 40 : 70 }
75
- style = { {
76
- objectFit : imageUrl === '/images/logo.svg' ? 'contain' : 'cover' ,
77
- width : imageUrl === '/images/logo.svg' ? '80px' : '100%' ,
78
- height : imageUrl === '/images/logo.svg' ? '40px' : '100%' ,
79
- } }
80
- />
81
- </ div >
82
-
83
-
65
+ < Image
66
+ src = { imageUrl }
67
+ alt = "Seller Image"
68
+ width = { imageUrl === '/images/logo.svg' ? 80 : 150 }
69
+ height = { imageUrl === '/images/logo.svg' ? 40 : 70 }
70
+ style = { {
71
+ objectFit : imageUrl === '/images/logo.svg' ? 'contain' : 'cover' ,
72
+ width : imageUrl === '/images/logo.svg' ? '80px' : '100%' ,
73
+ height : imageUrl === '/images/logo.svg' ? '40px' : '100%' ,
74
+ } }
75
+ />
76
+ </ div >
84
77
85
78
{ /* Trust-o-meter Label - Close to image */ }
86
79
< p style = { { textAlign : 'center' , fontWeight : 'bold' , fontSize : '14px' , marginBottom : '2px' } } >
0 commit comments