2020-02-28 12:52:32 +00:00
|
|
|
import React, { useMemo } from "react";
|
2020-02-28 11:30:27 +00:00
|
|
|
import PropTypes from "prop-types";
|
2020-02-20 16:35:07 +00:00
|
|
|
import SEO from "../components/seo";
|
|
|
|
import { App } from "../components";
|
|
|
|
import "../global.scss";
|
2020-02-28 12:52:32 +00:00
|
|
|
import AppContext from "../AppContext";
|
2021-02-19 09:46:36 +00:00
|
|
|
import "@fontsource/metropolis/all.css"; // import Metropolis typeface
|
2020-02-20 16:35:07 +00:00
|
|
|
|
2020-02-28 11:30:27 +00:00
|
|
|
export default function IndexPage({ location }) {
|
2020-02-28 12:52:32 +00:00
|
|
|
const context = useMemo(
|
|
|
|
() => ({
|
2020-03-23 14:02:47 +00:00
|
|
|
apiUrl: process.env.GATSBY_API_URL || location.origin,
|
2020-02-28 12:52:32 +00:00
|
|
|
}),
|
|
|
|
[location.origin]
|
|
|
|
);
|
|
|
|
|
2020-02-28 11:30:27 +00:00
|
|
|
return (
|
2020-02-28 12:52:32 +00:00
|
|
|
<AppContext.Provider value={context}>
|
2020-02-28 11:30:27 +00:00
|
|
|
<SEO />
|
|
|
|
<App />
|
2020-02-28 12:52:32 +00:00
|
|
|
</AppContext.Provider>
|
2020-02-28 11:30:27 +00:00
|
|
|
);
|
|
|
|
}
|
2020-02-20 16:35:07 +00:00
|
|
|
|
2020-02-28 11:30:27 +00:00
|
|
|
IndexPage.propTypes = {
|
2020-03-23 14:02:47 +00:00
|
|
|
location: PropTypes.object.isRequired,
|
2020-02-28 11:30:27 +00:00
|
|
|
};
|