diff --git a/components/OrangeButton.tsx b/components/OrangeButton.tsx index 0370782..ad7b78f 100644 --- a/components/OrangeButton.tsx +++ b/components/OrangeButton.tsx @@ -1,36 +1,55 @@ -import React from "react" +import React, { useMemo } from "react" +import Link from "next/link" export interface OrangeButtonProps { readonly buttonText: string readonly buttonLink: string readonly buttonMargin?: string readonly buttonPadding?: string + readonly isInternal?: boolean } const OrangeButton = (props: OrangeButtonProps) => { - const { buttonText, buttonLink, buttonMargin, buttonPadding } = props - return ( + const { buttonText, buttonLink, buttonMargin, buttonPadding, isInternal } = + props + + const content = useMemo(() => { + return ( + <> + {buttonText} + +
+ + > + ) + }, [buttonText]) + + return isInternal ? ( + + {content} + + ) : ( - {buttonText} - - - + {content} ) } diff --git a/layouts/MainLayout.tsx b/layouts/MainLayout.tsx index 902c9e6..c7522c4 100644 --- a/layouts/MainLayout.tsx +++ b/layouts/MainLayout.tsx @@ -53,7 +53,6 @@ const MainLayout = (props: MainLayoutProps) => { return () => window.removeEventListener("scroll", handleScroll) }) - // Compute the proper page title and URL const pageTitle = title return ( diff --git a/layouts/SectionLayout.tsx b/layouts/SectionLayout.tsx index 7871605..9aecc40 100644 --- a/layouts/SectionLayout.tsx +++ b/layouts/SectionLayout.tsx @@ -33,7 +33,7 @@ export interface SectionLayoutProps { /** * Tailwind bg - * Optional. This is always as wide as the screen width, and as high as scetion height. + * Optional. This is always as wide as the screen width, and as high as section height. * It is UNDER contentBackground */ sectionBackground?: string @@ -119,7 +119,7 @@ const SectionLayout = (props: SectionLayoutProps) => { )} > ) - }, [videoUrl, isMobile, isMd, isLg, isXl]) + }, [videoUrl, isMobile, isMd, isLg, isXl, contentBackground?.image]) useEffect(() => { if (fullScreenHeightOption) { @@ -140,7 +140,7 @@ const SectionLayout = (props: SectionLayoutProps) => { return (- {t("description404")} -
++ {t("messageBody")} +
+