File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -110,10 +110,11 @@ const mapToFullScheme = (rawData: FullSchemeData): Scheme => {
110110 }
111111 } else {
112112 // no physical branch. Group contact details together
113- if ( rawData . phone || rawData . email ) {
113+ if ( rawData . phone || rawData . email || rawData . address ) {
114114 contacts . push ( {
115115 phones : rawData . phone && rawData . phone ,
116116 emails : rawData . email && rawData . email ,
117+ address : rawData . address && rawData . address [ 0 ] ,
117118 } ) ;
118119 }
119120 }
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ function SchemeCard({scheme}: SchemeCardProps) {
2323 width = { 60 }
2424 radius = "sm"
2525 classNames = { {
26- wrapper : 'shrink-0'
26+ wrapper : 'shrink-0' ,
27+ img : 'object-contain'
2728 } }
2829 />
2930 < div className = "flex flex-col" >
Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ interface SchemeContactCardProps {
99}
1010
1111export default function SchemeContactCard ( { contact} : SchemeContactCardProps ) {
12+ if ( ! contact . address && ! contact . phones ?. length && ! contact . emails ?. length ) {
13+ return null ;
14+ }
15+
1216 return (
1317 < Card
1418 className = "p-4 flex flex-col gap-2"
You can’t perform that action at this time.
0 commit comments