fix: debugging template path

This commit is contained in:
NunoSempere 2022-06-18 14:43:38 -04:00
parent a5c4234db1
commit 17e78904ea

View File

@ -10,22 +10,22 @@ import path from "path";
import { Homepage } from "../components/homepage.js";
/* Definitions */
const elementsDocument = "../data/listForTemplate.json";
const elementsDocument = "../data/listOfObjects.json";
/* React components */
export async function getStaticProps() {
const directory = path.join(process.cwd(), "pages");
let listOfElementsForView = JSON.parse(
let listOfElementsInit = JSON.parse(
fs.readFileSync(path.join(directory, elementsDocument), "utf8")
);
return {
props: {
listOfElementsForView,
listOfElementsInit,
},
};
}
// Main react component
export default function Home({ listOfElementsForView }) {
return <Homepage listOfElementsForView={listOfElementsForView} />;
export default function Home({ listOfElementsInit }) {
return <Homepage listOfElementsInit={listOfElementsInit} />;
}