message: refactor(homepage): migrate to functional component
diff: import Head from 'next/head';
  import { Component } from 'react';
  +import slugify from 'slugify';
  +import graveyard from '../graveyard.json';
  +
  // Components
  import Header from '../components/Header';
  import App from '../components/App';
  import Footer from '../components/Footer';
  import Loader from '../components/Loader';
  -export default class HomePage extends Component {
  +export default function HomePage({items}) {
  - analytics() {
  + function analytics() {
  if (process.env.NODE_ENV === 'production' && typeof window !== 'undefined')
  return (<script async defer data-website-id="3aa5ec3a-fd12-47f1-97d7-cceb0631cae4" src="https://analytics.bale.media/umami.js"></script>);
  }
  - card() {
  + function card() {
  if (process.env.NODE_ENV === 'production')
  return (<script src="https://card.codyogden.com/card.js"></script>);
  }
  - render() {
  return (
  <>
  <Head>
  @@ -51,13 +53,38 @@ export default class HomePage extends Component {
  <meta name="msvalidate.01" content="0C9605AF449480F57421EECCA9EB2B8A" />
  <meta name="google-site-verification" content="9y9dretKdifnWDdkbkT9Qm1PtWMIe3qz6R09Xkm8Cdc" />
  <script id="mcjs" src="chimp.js"></script>
  - {this.analytics()}
  + {analytics()}
  </Head>
  <Header />
  - <App />
  + <App items={items} />
  <Footer />
  - {this.card()}
  + {card()}
  </>
  );
  }
  +
  +export function getStaticProps(context) {
  +
  + slugify.extend({
  + '+': '-plus',
  + '@': '-at',
  + });
  +
  + graveyard.map((item) => {
  + const newItem = item;
  + newItem.slug = slugify(item.name, {
  + lower: true,
  + });
  + return newItem;
  + });
  +
  + graveyard.sort(
  + (a, b) => new Date(b.dateClose) - new Date(a.dateClose)
  + );
  +
  + return {
  + props: {
  + items: graveyard
  + }
  + }
  }
  