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 OTHER = {};

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

export default function Services({ OTHER }) {
  return (
    <BasicPage
      page_title="Misc Projects"
      card_title="Some other things I do!"
      page_button_title="Take me back!"
      back_url="/projects"
    >
      <div className="rounded-lg ring-2 ring-alice-werefox-grey dark:ring-alice-werefox-grey-darker bg-alice-werefox-grey-light dark:bg-alice-werefox-grey">
        <PBlock title="Miscelaneous Projects" cards={OTHER} />
      </div>
    </BasicPage>
  );
}
