@@ -7,6 +7,7 @@ import { useLaunchStore } from '@gitroom/frontend/components/new-launch/store';
77import { useShallow } from 'zustand/react/shallow' ;
88import { useExistingData } from '@gitroom/frontend/components/launches/helpers/use.existing.data' ;
99import { makeId } from '@gitroom/nestjs-libraries/services/make.is' ;
10+ import ImageWithFallback from '@gitroom/react/helpers/image.with.fallback' ;
1011
1112export const PicksSocialsComponent : FC < { toolTip ?: boolean } > = ( {
1213 toolTip,
@@ -64,28 +65,24 @@ export const PicksSocialsComponent: FC<{ toolTip?: boolean }> = ({
6465 : 'border-[#622FF6]'
6566 ) }
6667 >
67- < div
68- className = "rounded-full min-w-[42px] min-h-[42px] bg-contain bg-center bg-no-repeat"
69- style = { { backgroundImage : `url(/no-picture.jpg)` } }
70- >
71- < Image
72- src = { integration . picture || '/no-picture.jpg' }
73- className = { clsx (
74- 'rounded-full transition-all min-w-[42px] border-[1.5px] min-h-[42px]' ,
75- selectedIntegrations . findIndex (
76- ( p ) => p . integration . id === integration . id
77- ) === - 1
78- ? 'border-transparent'
79- : 'border-[#000]'
80- ) }
81- onError = { ( e ) => {
82- e . currentTarget . style . display = 'none' ;
83- } }
84- alt = { integration . identifier }
85- width = { 42 }
86- height = { 42 }
87- />
88- </ div >
68+ < ImageWithFallback
69+ fallbackSrc = "/no-picture.jpg"
70+ src = { integration . picture || '/no-picture.jpg' }
71+ className = { clsx (
72+ 'rounded-full transition-all min-w-[42px] border-[1.5px] min-h-[42px]' ,
73+ selectedIntegrations . findIndex (
74+ ( p ) => p . integration . id === integration . id
75+ ) === - 1
76+ ? 'border-transparent'
77+ : 'border-[#000]'
78+ ) }
79+ onError = { ( e ) => {
80+ e . currentTarget . style . display = 'none' ;
81+ } }
82+ alt = { integration . identifier }
83+ width = { 42 }
84+ height = { 42 }
85+ />
8986 { integration . identifier === 'youtube' ? (
9087 < img
9188 src = "/icons/platforms/youtube.svg"
0 commit comments