src/Pages/Home/Home.js
/**
 * @function Home
 * @description The contents to render on the front page of the website.
 * @author Alexander Burdiss
 * @since 5/13/21
 * @version 2.2.0
 * @component
 * @example
 * <Home />
 */
@function Home
@description The contents to render on the front page of the website.
@function Home @description The contents to render on the front page of the website .
function Home() {
  const [weather, setWeather] = useState("clear");
  useEffect(function setup() {
    setWeather(getWeather());
  }, []);
  return (
    <StandardWrapper>
      <div className="Home-Container">
        <SEO />
        {weather == "fireworks" && (
          <div className="Fireworks-Home-Container">
            <Fireworks />
          </div>
        )}
        {weather == "clear" && <Fireflies />}
        {weather == "snow" && (
          <div className="Snow-Home-Container">
            <Snow />
          </div>
        )}
        <div className="Home-Door-Container">
          <DoorButton
            label="Read"
            image={StoriesImage}
            link="/read"
            alt="An earthy door framed by vines"
          />
          <DoorButton
            label="Play"
            image={PlaygroundImage}
            link="/play"
            alt="A door made of many small stained-glass panels"
          />
          <DoorButton
            label="About Us"
            image={AboutUsImage}
            link="/about"
            alt="A crooked wooden door"
          />
        </div>
      </div>
    </StandardWrapper>
  );
}
function Home ( ) { const [ weather , setWeather ] = useState ( "clear" ) ; useEffect ( function setup ( ) { setWeather ( getWeather ( ) ) ; } , [ ] ) ; return ( < StandardWrapper > < div className = "Home-Container" > < SEO / > { weather == "fireworks" && ( < div className = "Fireworks-Home-Container" > < Fireworks / > < / div > ) } { weather == "clear" && < Fireflies / > } { weather == "snow" && ( < div className = "Snow-Home-Container" > < Snow / > < / div > ) } < div className = "Home-Door-Container" > < DoorButton label = "Read" image = { StoriesImage } link = "/read" alt = "An earthy door framed by vines" / > < DoorButton label = "Play" image = { PlaygroundImage } link = "/play" alt = "A door made of many small stained-glass panels" / > < DoorButton label = "About Us" image = { AboutUsImage } link = "/about" alt = "A crooked wooden door" / > < / div > < / div > < / StandardWrapper > ) ; }
@function Home
 @description The contents to render on the front page of the website.
@function Home @description The contents to render on the front page of the website .