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'
|
const elementsDocument = '../data/listOfMoralGoods.json'
|
||||||
|
|
||||||
/* React components */
|
/* React components */
|
||||||
// fs can only be used here.
|
|
||||||
export async function getStaticProps() {
|
export async function getStaticProps() {
|
||||||
//getServerSideProps
|
|
||||||
// const { metaforecasts } = await getForecasts();
|
|
||||||
const directory = path.join(process.cwd(), "pages")
|
const directory = path.join(process.cwd(), "pages")
|
||||||
let listOfElementsForView = JSON.parse(fs.readFileSync(path.join(directory, elementsDocument), 'utf8'));
|
let listOfElementsForView = JSON.parse(fs.readFileSync(path.join(directory, elementsDocument), 'utf8'));
|
||||||
//console.log(directory)
|
|
||||||
//console.log("metaforecasts", metaforecasts)
|
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
listOfElementsForView
|
listOfElementsForView
|
||||||
|
|
|
@ -15,12 +15,8 @@ const elementsDocument = '../data/listOfResearchOutputs.json'
|
||||||
/* React components */
|
/* React components */
|
||||||
// fs can only be used here.
|
// fs can only be used here.
|
||||||
export async function getStaticProps() {
|
export async function getStaticProps() {
|
||||||
//getServerSideProps
|
|
||||||
// const { metaforecasts } = await getForecasts();
|
|
||||||
const directory = path.join(process.cwd(), "pages")
|
const directory = path.join(process.cwd(), "pages")
|
||||||
let listOfElementsForView = JSON.parse(fs.readFileSync(path.join(directory, elementsDocument), 'utf8'));
|
let listOfElementsForView = JSON.parse(fs.readFileSync(path.join(directory, elementsDocument), 'utf8'));
|
||||||
//console.log(directory)
|
|
||||||
//console.log("metaforecasts", metaforecasts)
|
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
listOfElementsForView
|
listOfElementsForView
|
||||||
|
|
Loading…
Reference in New Issue
Block a user