(payload: P) {
diff --git a/src/reducers/src/export-utils.ts b/src/reducers/src/export-utils.ts
index dc51c750e0..9cf8172d35 100644
--- a/src/reducers/src/export-utils.ts
+++ b/src/reducers/src/export-utils.ts
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project
-import {Blob} from 'global/window';
import {csvFormatRows} from 'd3-dsv';
import {EXPORT_DATA_TYPE} from '@kepler.gl/constants';
diff --git a/src/reducers/src/map-style-updaters.ts b/src/reducers/src/map-style-updaters.ts
index 3850e3e097..b801ed4179 100644
--- a/src/reducers/src/map-style-updaters.ts
+++ b/src/reducers/src/map-style-updaters.ts
@@ -3,7 +3,6 @@
import Task, {withTask} from 'react-palm/tasks';
import cloneDeep from 'lodash.clonedeep';
-import Console from 'global/console';
// Utils
import {
@@ -532,7 +531,7 @@ export const loadMapStyleErrUpdater = (
state: MapStyle,
{payload: {ids, error}}: MapStyleActions.LoadMapStyleErrUpdaterAction
): MapStyle => {
- Console.error(error);
+ console.error(error);
// reset isLoading
const isLoading = Object.keys(state.isLoading).reduce(
(accu, key) => ({
diff --git a/src/reducers/src/provider-state-updaters.ts b/src/reducers/src/provider-state-updaters.ts
index a48e5257a7..108ce383ed 100644
--- a/src/reducers/src/provider-state-updaters.ts
+++ b/src/reducers/src/provider-state-updaters.ts
@@ -2,7 +2,6 @@
// Copyright contributors to the kepler.gl project
import {withTask} from 'react-palm/tasks';
-import Console from 'global/console';
import {generateHashId, getError, isPlainObject, toArray} from '@kepler.gl/utils';
import {
EXPORT_FILE_TO_CLOUD_TASK,
@@ -70,12 +69,12 @@ function createActionTask(action, payload) {
function _validateProvider(provider, method) {
if (!provider) {
- Console.error(`provider is not defined`);
+ console.error(`provider is not defined`);
return false;
}
if (typeof provider[method] !== 'function') {
- Console.error(`${method} is not a function of Cloud provider: ${provider.name}`);
+ console.error(`${method} is not a function of Cloud provider: ${provider.name}`);
return false;
}
@@ -211,7 +210,7 @@ export const loadCloudMapUpdater = (
): ProviderState => {
const {loadParams, provider, onSuccess, onError} = action.payload;
if (!loadParams) {
- Console.warn('load map error: loadParams is undefined');
+ console.warn('load map error: loadParams is undefined');
return state;
}
if (!_validateProvider(provider, 'downloadMap')) {
@@ -258,7 +257,7 @@ function checkLoadMapResponseError(response) {
function getDatasetHandler(format) {
const defaultHandler = DATASET_HANDLERS[DATASET_FORMATS.csv];
if (!format) {
- Console.warn('format is not provided in load map response, will use csv by default');
+ console.warn('format is not provided in load map response, will use csv by default');
return defaultHandler;
}
@@ -266,7 +265,7 @@ function getDatasetHandler(format) {
const supportedFormat = Object.keys(DATASET_FORMATS)
.map(k => `'${k}'`)
.join(', ');
- Console.warn(
+ console.warn(
`unknown format ${format}. Please use one of ${supportedFormat}, will use csv by default`
);
return defaultHandler;
@@ -340,7 +339,7 @@ export const loadCloudMapErrorUpdater = (
): ProviderState => {
const message = getError(action.payload.error) || `Error loading saved map`;
- Console.warn(message);
+ console.warn(message);
const newState = {
...state,
diff --git a/src/reducers/src/vis-state-updaters.ts b/src/reducers/src/vis-state-updaters.ts
index b5d18856e1..fc65b8e32a 100644
--- a/src/reducers/src/vis-state-updaters.ts
+++ b/src/reducers/src/vis-state-updaters.ts
@@ -2,7 +2,6 @@
// Copyright contributors to the kepler.gl project
import bbox from '@turf/bbox';
-import {console as Console} from 'global/window';
import {disableStackCapturing, withTask} from 'react-palm/tasks';
import cloneDeep from 'lodash.clonedeep';
import uniq from 'lodash.uniq';
@@ -730,7 +729,7 @@ export function layerTypeChangeUpdater(
const idx = state.layers.findIndex(l => l.id === oldId);
if (!state.layerClasses[newType]) {
- Console.error(`${newType} is not a valid layer type`);
+ console.error(`${newType} is not a valid layer type`);
return state;
}
let newLayer = new state.layerClasses[newType]({
@@ -897,7 +896,7 @@ export function setFilterUpdater(
const oldFilter = state.filters[idx];
if (!oldFilter) {
- Console.error(`filters.${idx} is undefined`);
+ console.error(`filters.${idx} is undefined`);
return state;
}
let newFilter = set([prop], value, oldFilter);
@@ -1287,7 +1286,7 @@ export const addLayerUpdater = (
if (action.config) {
newLayer = createLayerFromConfig(state, action.config);
if (!newLayer) {
- Console.warn(
+ console.warn(
'Failed to create layer from config, it usually means the config is not be in correct format',
action.config
);
@@ -1339,7 +1338,7 @@ export function removeLayerUpdater