import BasicPage from "../../../components/basic-page";
import PBlock from "../../../components/project-block";

// An object listing pages folks can visit
export async function getStaticProps() {
  const fs = require("fs");
  const yaml = require("js-yaml");
  let SERVICES = {};

  try {
    let fileContent = fs.readFileSync("./data/services.yml", "utf8");
    SERVICES = yaml.load(fileContent);
  } catch (e) {
    console.log(e);
  }
  return {
    props: {
      SERVICES,
    },
  };
}

export default function Services({ SERVICES }) {
  return (
    <BasicPage page_title="Werefox Services" card_title="Services I Host!">
      <div className="rounded-lg ring-2 ring-werefox-grey dark:ring-werefox-grey-darker bg-werefox-grey-light dark:bg-werefox-grey">
        <PBlock title="Services" cards={SERVICES} />
      </div>
    </BasicPage>
  );
}
