{"size": 1185, "ext": "js", "max_stars_repo_path": "src/components/page.js", "max_stars_repo_name": "storyblok-components/gatsby-sbc-boilerplate", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/page.js", "max_issues_repo_name": "storyblok-components/gatsby-sbc-boilerplate", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/page.js", "max_forks_repo_name": "storyblok-components/gatsby-sbc-boilerplate", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.2127659574, "max_line_length": 78, "alphanum_fraction": 0.5856540084}
import React, { useContext, useEffect } from "react";
// import PageContext from "../context/PageContext";
import {PageContextHooks} from "../context/PageContextHooks";
import Components from "./components.js";
import SEO from "./utils/seo";

const Page = (props) => {
  console.log("and this is props from page: ")
  console.log(props)
  // const {
  //   blok: { transparent_header },
  // } = props;
  const pageContext = useContext(PageContextHooks);
  // useEffect(() => {
  //   pageContext.set({ data: { ...pageContext.data, transparent_header } });
  // }, [transparent_header, pageContext]);

  return (
    <>
      <SEO
        title={props.story.name}
        pathname={props.story.slug === "home" ? "" : props.story.full_slug}
      />


      <main className="py-4">
        {props.content?.body?.map((blok) => {
          return React.createElement(Components(blok.component), {
            key: blok._uid,
            blok,
          })
        })}
      </main>
    </>
  );
};

export default Page;

// {props.content.body &&
// props.content.body.map((blok) =>
//   React.createElement(Components(blok.component), {
//     key: blok._uid,
//     blok,
//   })
// )}
