fix: Make interface nicer
This commit is contained in:
parent
7ae03e791b
commit
a154b34100
|
@ -13,14 +13,9 @@ import ComparisonView from '../lib/comparisonView.js'
|
|||
const elementsDocument = '../data/listOfMoralGoods.json'
|
||||
|
||||
/* React components */
|
||||
// fs can only be used here.
|
||||
export async function getStaticProps() {
|
||||
//getServerSideProps
|
||||
// const { metaforecasts } = await getForecasts();
|
||||
const directory = path.join(process.cwd(), "pages")
|
||||
let listOfElementsForView = JSON.parse(fs.readFileSync(path.join(directory, elementsDocument), 'utf8'));
|
||||
//console.log(directory)
|
||||
//console.log("metaforecasts", metaforecasts)
|
||||
return {
|
||||
props: {
|
||||
listOfElementsForView
|
||||
|
|
|
@ -15,12 +15,8 @@ const elementsDocument = '../data/listOfResearchOutputs.json'
|
|||
/* React components */
|
||||
// fs can only be used here.
|
||||
export async function getStaticProps() {
|
||||
//getServerSideProps
|
||||
// const { metaforecasts } = await getForecasts();
|
||||
const directory = path.join(process.cwd(), "pages")
|
||||
let listOfElementsForView = JSON.parse(fs.readFileSync(path.join(directory, elementsDocument), 'utf8'));
|
||||
//console.log(directory)
|
||||
//console.log("metaforecasts", metaforecasts)
|
||||
return {
|
||||
props: {
|
||||
listOfElementsForView
|
||||
|
|
Loading…
Reference in New Issue
Block a user