diff --git a/src/components/Item/VisualizationItem/Visualization/IframePlugin.js b/src/components/Item/VisualizationItem/Visualization/IframePlugin.js index 0251859e6..4a8f00765 100644 --- a/src/components/Item/VisualizationItem/Visualization/IframePlugin.js +++ b/src/components/Item/VisualizationItem/Visualization/IframePlugin.js @@ -46,12 +46,7 @@ const IframePlugin = ({ const [error, setError] = useState(null) // When this mounts, check if the dashboard is recording - const { isCached, recordingState } = useCacheableSection(dashboardId) - - // set this to false after first props transfer with true flag - const [recordOnNextLoad, setRecordOnNextLoad] = useState( - recordingState === 'recording' - ) + const { isCached } = useCacheableSection(dashboardId) const pluginType = [CHART, REPORT_TABLE].includes(activeType) ? VISUALIZATION @@ -60,6 +55,7 @@ const IframePlugin = ({ const onError = () => setError('plugin') const onInstallationStatusChange = useCallback( (installationStatus) => { + console.log('DS installation status change', installationStatus) if (isFirstOfType) { dispatch( acAddIframePluginStatus({ @@ -71,11 +67,6 @@ const IframePlugin = ({ }, [dispatch, isFirstOfType, pluginType] ) - const onPropsReceived = useCallback(() => { - if (recordOnNextLoad) { - setRecordOnNextLoad(false) - } - }, [recordOnNextLoad]) const pluginProps = useMemo( () => ({ @@ -85,7 +76,6 @@ const IframePlugin = ({ visualization, onError, onInstallationStatusChange, - onPropsReceived, // For caching: --- // Add user & dashboard IDs to cache ID to avoid removing a cached @@ -93,7 +83,6 @@ const IframePlugin = ({ // TODO: May also want user ID too for multi-user situations cacheId: `${dashboardId}-${itemId}`, isParentCached: isCached, - recordOnNextLoad, }), [ userSettings, @@ -102,8 +91,6 @@ const IframePlugin = ({ itemId, isCached, onInstallationStatusChange, - onPropsReceived, - recordOnNextLoad, ] )