import ButtonGrid from "components/ButtonGrid";
import Lanyard from "components/Lanyard";
import Title from "components/Title";
import getProfiles from "utils/shared/profiles";
import { SocialButton } from "utils/types";
import styles from "styles/Index.module.sass";

export async function getStaticProps() {
  const profiles = await getProfiles();
  return {
    props: {
      profiles,
    },
  };
}

const IndexPage = (props: { profiles: SocialButton[] }) => (
  <>
    <div className={styles.center}>
      <Title />
      <div>
        <p>Profiles</p>
        <ButtonGrid Buttons={props.profiles} />
      </div>
    </div>
    <Lanyard />
  </>
);

export default IndexPage;
