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

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

export default function Services({ STREAMING }) {
  return (
    <BasicPage
      page_title="Streaming Links"
      card_title="Come watch my streams!"
      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="Streaming" cards={STREAMING} />
      </div>
    </BasicPage>
  );
}
