installed three js added test model to contact form section fixed issue with double render of useEffect that was causing it to show up twice once compiled. This was resolved using a boolean check to see if it is mounted first. n Next.js, when you navigate between pages, the entire React tree is unmounted and then remounted. This means that any component with a useEffect hook will run its cleanup function before being unmounted, and then its effect function again when it is remounted. This can cause the effect to run twice.
19 lines
684 B
JavaScript
19 lines
684 B
JavaScript
import Link from "next/link";
|
|
|
|
const SubSection = ({ h2Text, p1Text, h3Text, p2Text }) => {
|
|
return (
|
|
<div className="relative bg-blue-600 w-full h-screen">
|
|
<div className="relative z-10 flex flex-col items-center justify-center h-full">
|
|
<div className="relative flex justify-center items-end w-full mb-20">
|
|
<h2 className="text-5xl font-normal text-white mt-8">{h2Text}</h2>
|
|
</div>
|
|
<p className="text-white text-lg mx-4 px-2">{p1Text}</p>
|
|
<h3 className="text-5xl font-normal text-white mt-8">{h3Text}</h3>
|
|
<p className="text-white text-lg mx-4 px-2">{p2Text}</p>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default SubSection;
|