import BasicPage from "../../components/basic-page";
import SBlock from "../../components/support-block";

// An object listing pages folks can visit
export async function getStaticProps() {
  const fs = require("fs");
  const yaml = require("js-yaml");
  let SUPPORT = {};
  try {
    let fileContent = fs.readFileSync("./data/pages/support.yml", "utf8");
    SUPPORT = yaml.load(fileContent);
  } catch (e) {
    console.log(e);
  }
  return {
    props: {
      SUPPORT,
    },
  };
}

export default function Support({ SUPPORT }) {
  return (
    <BasicPage
      page_title="Support"
      card_title="Support Me!"
      page_button_title="Take me back home!"
    >
      <SBlock support={SUPPORT} />
    </BasicPage>
  );
}
