diff --git a/components/blocks/internalCarousel.tsx b/components/blocks/internalCarousel.tsx index 2e678971cf..764103ff2f 100644 --- a/components/blocks/internalCarousel.tsx +++ b/components/blocks/internalCarousel.tsx @@ -69,7 +69,7 @@ const renderBody = ({ header, paragraph, website, technologies }) => {

{header}

- Visit Website + {website && Visit Website}
diff --git a/components/customLink.tsx b/components/customLink.tsx index d4652da003..081aa12454 100644 --- a/components/customLink.tsx +++ b/components/customLink.tsx @@ -16,7 +16,7 @@ const isExternalLink = (href: string): boolean => { // i.e. href = https://anydomain.com.au => true | href = https://ssw.com.au/rule/* => true for SSW External Site | href = /company => false for relative path return ( isExternalSSWSite(href) || - (href.startsWith("https://") && !href.includes("ssw.com.au")) // checking relative path and external domains i.e. /company + (href?.startsWith("https://") && !href.includes("ssw.com.au")) // checking relative path and external domains i.e. /company ); }; @@ -37,6 +37,7 @@ export const CustomLink: React.FC = ({ const rel = isExternal && !href.includes("ssw") ? "noopener noreferrer nofollow" : ""; + if (!href) return <>; return ( <> {isExternal ? (