diff --git a/src/components/app.tsx b/src/components/app.tsx index d510891..ef33265 100644 --- a/src/components/app.tsx +++ b/src/components/app.tsx @@ -54,12 +54,12 @@ function App() { const res = await createTableFromSelections(selectedOptions); if (res !== "success") { setStatusMessage("Fetch Error. Please retry."); - setStatusGraphic() + setStatusGraphic(); } else { setStatusMessage("Fetched data."); setStatusGraphic(); } - } + }; const handleGetData = async () => { const numberOfRows = getNumberOfItems(selectedOptions); @@ -75,7 +75,7 @@ function App() { if (getDataAnyway) { await getData(); } - } + }; return (
diff --git a/src/components/information.scss b/src/components/information.scss index 1aaf93b..071e851 100644 --- a/src/components/information.scss +++ b/src/components/information.scss @@ -2,8 +2,8 @@ .popUpContent { position: absolute; - left: 12px; - right: 12px; + width: 310px; + left: calc(50% - 155px); top: 35px; z-index: 3; @@ -17,6 +17,11 @@ max-height: 1000px; border-width: 1px; + .popUpBody { + background-color: white; + padding: 12px; + font-size: 13px; + } } .popUpFooter { @@ -35,9 +40,4 @@ left: 0; right: 0; bottom: 0; -} - -.popUpBody { - background-color: white; - padding: 12px; } \ No newline at end of file diff --git a/src/components/information.tsx b/src/components/information.tsx index ed61e25..610e13b 100644 --- a/src/components/information.tsx +++ b/src/components/information.tsx @@ -13,7 +13,23 @@ export const Information: React.FC = (props) => {
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ipsum velit, pellentesque eget turpis. +

+ Source: This data comes from the National Agricultural Statistics Service (NASS) supplied + by the U.S. Department of Agriculture. The NASS conducts hundreds of surveys every year, curates + and makes public the data collected, and prepares reports covering virtually every aspect of U.S. + agriculture. The data collected includes production and supplies of food, farm labor and wages, + and changes in the demographics of U.S. producers. +

+

Learn more about the NASS

+

Access the full NASS dataset

+

Read reports published by NASS

+

+ Acknowledgements: Brought to you by the DataPBL project, a collaboration between + Concord Consortium, EL Education, and the University of Colorado. This material is supported + by the National Science Foundation under Grant No. DRL-2200887. Any opinions, findings, and + conclusions or recommendations expressed in this material are those of the authors and + do not necessarily reflect the views of the NSF. +

diff --git a/src/components/warning.tsx b/src/components/warning.tsx index ad2f4f2..bd0e2f3 100644 --- a/src/components/warning.tsx +++ b/src/components/warning.tsx @@ -21,8 +21,16 @@ export const Warning: React.FC = (props) => {
- - + + + + + +
diff --git a/src/scripts/api.ts b/src/scripts/api.ts index ac2fbde..6238561 100644 --- a/src/scripts/api.ts +++ b/src/scripts/api.ts @@ -113,7 +113,7 @@ export const getAllAttrs = (selectedOptions: IStateOptions) => { } } return allAttrs; -} +}; export const getNumberOfItems = (selectedOptions: IStateOptions) => { let {states, years} = selectedOptions; @@ -126,10 +126,10 @@ export const getNumberOfItems = (selectedOptions: IStateOptions) => { } else { return states.length * years.length; } -} +}; export const createTableFromSelections = async (selectedOptions: IStateOptions) => { - const {geographicLevel, states, cropUnits, years, ...subOptions} = selectedOptions; + const {geographicLevel} = selectedOptions; try { const allAttrs = getAllAttrs(selectedOptions); const requests = getAllRequests(selectedOptions);