Skip to content

Commit 57f8924

Browse files
committed
created validatedurl
1 parent 9493fa4 commit 57f8924

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/components/SupportUsButton.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ function SupportUsButton({
8080
},
8181
buttonVariant = "AOSSIE",
8282
}: supportUsButtonProps): React.JSX.Element {
83+
const validatedUrl = validateUrl(organizationInformation?.url);
8384
return (
8485
// Container for the support us button, with dynamic classes based on the selected theme and custom class names
8586
<div
@@ -203,9 +204,10 @@ function SupportUsButton({
203204
</div>
204205

205206
{/* Visit Organization Button */}
206-
{validateUrl(organizationInformation.url) && (
207+
208+
{validatedUrl && (
207209
<a
208-
href={validateUrl(organizationInformation.url)}
210+
href={validatedUrl}
209211
target="_blank"
210212
rel="noopener noreferrer"
211213
title={`Visit ${organizationInformation.name}'s website`}

0 commit comments

Comments
 (0)