@@ -3,20 +3,31 @@ import { useSelector, useDispatch } from 'react-redux'
33import { ErrorState } from './emptyState/ErrorState'
44import { GetStarted } from './emptyState/GetStarted'
55import { ZoomedInPlot } from './ZoomedInPlot'
6+ import { ErrorsModal } from './ErrorsModal'
67import { CustomPlotsWrapper } from './customPlots/CustomPlotsWrapper'
78import { TemplatePlotsWrapper } from './templatePlots/TemplatePlotsWrapper'
89import { ComparisonTableWrapper } from './comparisonTable/ComparisonTableWrapper'
910import { Ribbon } from './ribbon/Ribbon'
10- import { setMaxNbPlotsPerRow , setZoomedInPlot } from './webviewSlice'
11+ import {
12+ setMaxNbPlotsPerRow ,
13+ setZoomedInPlot ,
14+ setShowErrorsModal
15+ } from './webviewSlice'
1116import styles from './styles.module.scss'
1217import { EmptyState } from '../../shared/components/emptyState/EmptyState'
1318import { Modal } from '../../shared/components/modal/Modal'
1419import { PlotsState } from '../store'
1520
1621export const PlotsContent = ( ) => {
1722 const dispatch = useDispatch ( )
18- const { hasData, hasPlots, hasUnselectedPlots, zoomedInPlot, cliError } =
19- useSelector ( ( state : PlotsState ) => state . webview )
23+ const {
24+ hasData,
25+ hasPlots,
26+ hasUnselectedPlots,
27+ zoomedInPlot,
28+ cliError,
29+ showErrorsModal
30+ } = useSelector ( ( state : PlotsState ) => state . webview )
2031 const hasComparisonData = useSelector (
2132 ( state : PlotsState ) => state . comparison . hasData
2233 )
@@ -63,6 +74,16 @@ export const PlotsContent = () => {
6374 </ Modal >
6475 )
6576
77+ const errorsModal = showErrorsModal && (
78+ < Modal
79+ onClose = { ( ) => {
80+ dispatch ( setShowErrorsModal ( false ) )
81+ } }
82+ >
83+ < ErrorsModal />
84+ </ Modal >
85+ )
86+
6687 const hasCustomPlots = customPlotIds . length > 0
6788
6889 if ( cliError ) {
@@ -93,6 +114,7 @@ export const PlotsContent = () => {
93114 < ComparisonTableWrapper />
94115 < CustomPlotsWrapper />
95116 { modal }
117+ { errorsModal }
96118 </ div >
97119 )
98120}
0 commit comments