From c1ae86b100e02723aa9322bb7f32127b6741bb79 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Thu, 25 Nov 2021 11:09:17 +0000 Subject: [PATCH] tweak: Small reorganizing --- README.md | 2 ++ {pages => data}/listOfMoralGoods.json | 0 {pages => data}/listOfResearchOutputs.json | 0 data/test.js | 3 +++ pages/index.js | 2 +- pages/research.js | 5 +++-- 6 files changed, 9 insertions(+), 3 deletions(-) rename {pages => data}/listOfMoralGoods.json (100%) rename {pages => data}/listOfResearchOutputs.json (100%) create mode 100644 data/test.js diff --git a/README.md b/README.md index 5229027..3d7a201 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ The core structure is json array of objects. Only the "name" attribute is requir The `isReferenceValue` property determines the display at the end, but it is optional. +So internally this would look like: + ``` [ { diff --git a/pages/listOfMoralGoods.json b/data/listOfMoralGoods.json similarity index 100% rename from pages/listOfMoralGoods.json rename to data/listOfMoralGoods.json diff --git a/pages/listOfResearchOutputs.json b/data/listOfResearchOutputs.json similarity index 100% rename from pages/listOfResearchOutputs.json rename to data/listOfResearchOutputs.json diff --git a/data/test.js b/data/test.js new file mode 100644 index 0000000..5df75af --- /dev/null +++ b/data/test.js @@ -0,0 +1,3 @@ +import listOfElements from 'listOfMoralGoods.js' + +console.log(listOfElements) \ No newline at end of file diff --git a/pages/index.js b/pages/index.js index 16e28bb..ee093e0 100644 --- a/pages/index.js +++ b/pages/index.js @@ -1,5 +1,5 @@ /* Definitions */ -const elementsDocument = 'listOfMoralGoods.json' +const elementsDocument = '../data/listOfMoralGoods.json' const domain = 250 /* Imports */ diff --git a/pages/research.js b/pages/research.js index c65298d..38ea83f 100644 --- a/pages/research.js +++ b/pages/research.js @@ -5,9 +5,10 @@ */ /* Definitions */ -const elementsDocument = 'listOfResearchOutputs.json' +const elementsDocument = '../data/listOfResearchOutputs.json' const domain = 10**7 + /* Imports */ import Head from 'next/head' import React, { useState } from "react"; @@ -409,4 +410,4 @@ export default function Home({ listOfElementsDefault }) { ) -} +} \ No newline at end of file