@cdc/waffle-chart 4.24.7 → 4.24.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdc/waffle-chart",
3
- "version": "4.24.7",
3
+ "version": "4.24.9",
4
4
  "description": "React component for displaying a single piece of data in a card module",
5
5
  "moduleName": "CdcWaffleChart",
6
6
  "main": "dist/cdcwafflechart",
@@ -27,7 +27,7 @@
27
27
  "license": "Apache-2.0",
28
28
  "homepage": "https://github.com/CDCgov/cdc-open-viz#readme",
29
29
  "dependencies": {
30
- "@cdc/core": "^4.24.7",
30
+ "@cdc/core": "^4.24.9",
31
31
  "@visx/group": "^3.0.0",
32
32
  "@visx/scale": "^3.0.0",
33
33
  "@visx/shape": "^3.0.0",
@@ -42,5 +42,5 @@
42
42
  "react": "^18.2.0",
43
43
  "react-dom": "^18.2.0"
44
44
  },
45
- "gitHead": "7a7372d03778cb977e0e92e3b3bc1a35f8a5bfaf"
45
+ "gitHead": "c4b0402afe6ed209a85b7078711549b9fd7dae7d"
46
46
  }
@@ -382,7 +382,7 @@ const CdcWaffleChart = ({ configUrl, config: configObj, isDashboard = false, isE
382
382
 
383
383
  response.data = responseData
384
384
 
385
- const processedConfig = { ...(await coveUpdateWorker(response)) }
385
+ const processedConfig = { ...coveUpdateWorker(response) }
386
386
  updateConfig({ ...defaults, ...processedConfig })
387
387
  dispatch({ type: 'SET_LOADING', payload: false })
388
388
  }, [])
@@ -417,21 +417,12 @@ const CdcWaffleChart = ({ configUrl, config: configObj, isDashboard = false, isE
417
417
  }
418
418
  }, [config, container])
419
419
 
420
- //Reload config if config object provided/updated
420
+ // eslint-disable-next-line react-hooks/rules-of-hooks
421
421
  useEffect(() => {
422
- // eslint-disable-next-line no-console
423
- loadConfig().catch(err => console.log(err))
424
- }, [])
425
-
426
- //Reload config if parent passes different config
427
- if (configObj) {
428
- // eslint-disable-next-line react-hooks/rules-of-hooks
429
- useEffect(() => {
430
- if (!configObj.dataUrl) {
431
- updateConfig({ ...defaults, ...configObj })
432
- }
433
- }, [configObj.data])
434
- }
422
+ if (!configObj.dataUrl) {
423
+ updateConfig({ ...defaults, ...configObj })
424
+ }
425
+ }, [configObj?.data])
435
426
 
436
427
  let content = <Loading />
437
428