fix: debugging template path
This commit is contained in:
parent
a5c4234db1
commit
17e78904ea
|
@ -10,22 +10,22 @@ import path from "path";
|
||||||
import { Homepage } from "../components/homepage.js";
|
import { Homepage } from "../components/homepage.js";
|
||||||
|
|
||||||
/* Definitions */
|
/* Definitions */
|
||||||
const elementsDocument = "../data/listForTemplate.json";
|
const elementsDocument = "../data/listOfObjects.json";
|
||||||
|
|
||||||
/* React components */
|
/* React components */
|
||||||
export async function getStaticProps() {
|
export async function getStaticProps() {
|
||||||
const directory = path.join(process.cwd(), "pages");
|
const directory = path.join(process.cwd(), "pages");
|
||||||
let listOfElementsForView = JSON.parse(
|
let listOfElementsInit = JSON.parse(
|
||||||
fs.readFileSync(path.join(directory, elementsDocument), "utf8")
|
fs.readFileSync(path.join(directory, elementsDocument), "utf8")
|
||||||
);
|
);
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
listOfElementsForView,
|
listOfElementsInit,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Main react component
|
// Main react component
|
||||||
export default function Home({ listOfElementsForView }) {
|
export default function Home({ listOfElementsInit }) {
|
||||||
return <Homepage listOfElementsForView={listOfElementsForView} />;
|
return <Homepage listOfElementsInit={listOfElementsInit} />;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user