1import React, {useState, useEffect}from 'react';2import Cookies from 'js-cookie'34const Home = ()=>{5 const[isNewShopper, setIsNewShopper] = useState();67 useEffect(()=>{89 // Find out if the site visitor is a new shopper by checking for the isNewShopper cookie.10 const isNewShopperCookie = Cookies.get('isNewShopper');1112 // If the cookie isn't found, set it on the server and treat the site visitor as a new shopper.13 setIsNewShopper(isNewShopperCookie != null ? isNewShopperCookie === 'true' : true);14}, []);1516 return(17{isNewShopper ? (1819 // Show this message to a new shopper.20<h1>Welcome! We're glad you're here.</h1>21) : (2223 // Show this message to a returning shopper.24<h1>Welcome back!</h1>25)}2627 // ... Code for the rest of your homepage28)29}