diff --git a/src/components/sections/two-column-h2.js b/src/components/sections/two-column-h2.js index 1238e85c6..f1c90615c 100644 --- a/src/components/sections/two-column-h2.js +++ b/src/components/sections/two-column-h2.js @@ -2,32 +2,43 @@ import * as React from "react"; import Image from "../imageComponent"; import { Link } from "gatsby"; -export default class TwoColumnH2 extends React.Component { - render() { - return ( -
-
-
- {this.props.title} -
-
-
-

{this.props.title}

-
-
- - {this.props.buttonPrimaryTitle} +const TwoColumnH2 = ({ + direction, + title, + image, + text, + buttonPrimaryUrl, + buttonPrimaryClass, + buttonPrimaryTitle, + buttonSecondaryUrl, + buttonSecondaryClass, + buttonSecondaryTitle, +}) => { + return ( +
+
+
+ {title} +
+
+
+

{title}

+
+
+ + {buttonPrimaryTitle} + + {buttonSecondaryTitle && ( + + {buttonSecondaryTitle} - {this.props.buttonSecondaryTitle && ( - - {this.props.buttonSecondaryTitle} - - )} -
+ )}
-
- ); - } -} +
+
+ ); +}; + +export default TwoColumnH2; diff --git a/src/pages/what-is-celestia.js b/src/pages/what-is-celestia.js index a985cc899..33e656f63 100644 --- a/src/pages/what-is-celestia.js +++ b/src/pages/what-is-celestia.js @@ -42,7 +42,11 @@ const WhatIsCelestia = () => { return () => { if (currentRefs) { - currentRefs.forEach((ref) => observer.unobserve(ref)); + currentRefs.forEach((ref) => { + if (ref instanceof Element) { + observer.unobserve(ref); + } + }); } }; }, []);