diff --git a/package-lock.json b/package-lock.json
index b79066d..d6417c4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "riskwise",
- "version": "0.6.4",
+ "version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "riskwise",
- "version": "0.6.4",
+ "version": "1.0.0",
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
@@ -7307,6 +7307,20 @@
"node": ">=16 || 14 >=14.17"
}
},
+ "node_modules/config-file-ts/node_modules/typescript": {
+ "version": "5.9.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz",
+ "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
"node_modules/confusing-browser-globals": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz",
@@ -18657,15 +18671,17 @@
}
},
"node_modules/typescript": {
- "version": "5.6.3",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",
- "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",
+ "version": "4.9.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
+ "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
+ "license": "Apache-2.0",
+ "peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
- "node": ">=14.17"
+ "node": ">=4.2.0"
}
},
"node_modules/unbox-primitive": {
diff --git a/src/components/controls/MainViewControls.js b/src/components/controls/MainViewControls.js
index 6abd2d4..2aedb5f 100644
--- a/src/components/controls/MainViewControls.js
+++ b/src/components/controls/MainViewControls.js
@@ -7,15 +7,18 @@ import BarChartIcon from "@mui/icons-material/BarChart";
import useStore from "../../store";
-const controls = [
+const allControls = [
{ id: "display_map", icon: },
{ id: "display_chart", icon: },
];
const MainViewControls = () => {
- const { activeViewControl, setActiveViewControl } = useStore();
+ const { activeViewControl, setActiveViewControl, selectedSubTab } = useStore();
const { t } = useTranslation();
+ const controls =
+ selectedSubTab === 1 ? allControls.filter((c) => c.id !== "display_map") : allControls;
+
const handleSelect = (control) => {
setActiveViewControl(control);
};
@@ -23,6 +26,7 @@ const MainViewControls = () => {
return (
{
- const { activeViewControl, selectedSubTab, selectedTab, setSelectedSubTab } = useStore();
+ const {
+ activeViewControl,
+ selectedSubTab,
+ selectedTab,
+ setSelectedSubTab,
+ setActiveViewControl,
+ } = useStore();
const { handleSaveImage, handleSaveMap, handleAddToOutput } = useMapTools();
const { t } = useTranslation();
@@ -27,6 +33,11 @@ const MainSubTabs = () => {
const handleSubTabChange = (event, newValue) => {
setSelectedSubTab(newValue);
+ // Set the active vew to display_chart if Economic & Non-Economic tab is selected.
+ // The display_map is not currently available for this tab.
+ if (newValue === 1) {
+ setActiveViewControl("display_chart");
+ }
};
const handleButtonClick = (index) => {