@@ -81,6 +81,20 @@ function SupportUsButton({
8181 buttonVariant = "AOSSIE" ,
8282} : supportUsButtonProps ) : React . JSX . Element {
8383 const validatedUrl = validateUrl ( organizationInformation ?. url ) ;
84+ const logoContent =
85+ typeof organizationInformation . logo === "string" ? (
86+ < span className = "block h-fit w-fit p-4 bg-black text-white rounded-2xl" >
87+ < b className = "text-2xl italic" > { organizationInformation . logo } </ b >
88+ </ span >
89+ ) : (
90+ < img
91+ className = "w-24 h-24 bg-white/80 select-none rounded-2xl object-cover object-center"
92+ src = { organizationInformation . logo ?. src }
93+ alt = { organizationInformation . logo ?. alt }
94+ title = { organizationInformation . logo ?. alt }
95+ draggable = { false }
96+ />
97+ ) ;
8498 return (
8599 // Container for the support us button, with dynamic classes based on the selected theme and custom class names
86100 < div
@@ -173,47 +187,23 @@ function SupportUsButton({
173187
174188 { /* Organization logo */ }
175189
176- < div >
177- { organizationInformation ?. logo ? (
178- validatedUrl ? (
179- < a
180- href = { validatedUrl }
181- target = "_blank"
182- rel = "noopener noreferrer"
183- title = { `Visit ${ organizationInformation ?. name } ` }
184- className = "inline-block transition-transform duration-200 hover:scale-105 hover:shadow-lg cursor-pointer"
185- >
186- { typeof organizationInformation . logo === "string" ? (
187- < span className = "block h-fit w-fit p-4 bg-black text-white rounded-2xl" >
188- < b className = "text-2xl italic" >
189- { organizationInformation . logo }
190- </ b >
191- </ span >
190+ < div >
191+ { organizationInformation ?. logo &&
192+ ( validatedUrl ? (
193+ < a
194+ href = { validatedUrl }
195+ target = "_blank"
196+ rel = "noopener noreferrer"
197+ title = { `Visit ${ organizationInformation . name } ` }
198+ className = "inline-block transition-transform duration-200 hover:scale-105 hover:shadow-lg cursor-pointer"
199+ >
200+ { logoContent }
201+ </ a >
192202 ) : (
193- < img
194- className = "w-24 h-24 bg-white/80 select-none rounded-2xl object-cover object-center"
195- src = { organizationInformation . logo . src }
196- alt = { organizationInformation . logo . alt }
197- draggable = { false }
198- />
199- ) }
200- </ a >
201- ) : typeof organizationInformation . logo === "string" ? (
202- < span className = "block h-fit w-fit p-4 bg-black text-white rounded-2xl" >
203- < b className = "text-2xl italic" >
204- { organizationInformation . logo }
205- </ b >
206- </ span >
207- ) : (
208- < img
209- className = "w-24 h-24 bg-white/80 select-none rounded-2xl object-cover object-center"
210- src = { organizationInformation . logo . src }
211- alt = { organizationInformation . logo . alt }
212- draggable = { false }
213- />
214- )
215- ) : null }
216- </ div >
203+ logoContent
204+ ) ) }
205+ </ div >
206+
217207 { /* Organization name and description */ }
218208 < div className = "flex flex-col gap-4" >
219209 < h2 className = { `font-extrabold text-4xl md:text-5xl lg:text-6xl` } >
@@ -224,9 +214,6 @@ function SupportUsButton({
224214 </ p >
225215 </ div >
226216
227-
228-
229-
230217 { /* Line */ }
231218 { organizationInformation . projectInformation && (
232219 < div
@@ -325,7 +312,7 @@ function SupportUsButton({
325312 < div className = "flex flex-row flex-wrap justify-center items-center gap-10 z-10" >
326313 { sponsors . map ( ( sponsor , index ) => (
327314 < a
328- href = { validateUrl ( sponsor . link ) }
315+ href = { sponsor . link }
329316 key = { index }
330317 target = "_blank"
331318 rel = "noopener noreferrer"
@@ -468,7 +455,7 @@ function SupportUsButton({
468455 < div className = "flex flex-wrap justify-center items-center gap-5 mt-8" >
469456 { ctaSection . sponsorLink . map ( ( link , index ) => (
470457 < a
471- href = { validateUrl ( link . url ) }
458+ href = { link . url }
472459 key = { index }
473460 { ...( link . newTab && { target : "_blank" } ) }
474461 rel = "noopener noreferrer"
0 commit comments