Skip to content

Commit

Permalink
chore(logs): remove console.logs
Browse files Browse the repository at this point in the history
  • Loading branch information
willian-viana committed Oct 28, 2024
1 parent 1ba8681 commit 20662b1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 27 deletions.
2 changes: 0 additions & 2 deletions components/map/components/popup/component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ class Popup extends Component {
componentDidUpdate(prevProps) {
const { interactionsOptions, activeDatasets } = this.props;

console.log('this.props', this.props)

if (
isEmpty(interactionsOptions) &&
!isEqual(activeDatasets?.length, prevProps.activeDatasets?.length)
Expand Down
41 changes: 21 additions & 20 deletions providers/geostore-provider/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const fetchGeostore = createThunkAction(
'fetchGeostore',
(params) => (dispatch) => {
const { type, adm0, adm1 = 25, adm2 = 390, token } = params;
console.log('params', params)

if (type && adm0) {
dispatch(setGeostoreLoading({ loading: true, error: false }));
getGeostore({ type, adm0, adm1, adm2, token })
Expand All @@ -37,26 +37,27 @@ export const fetchGeostore = createThunkAction(

export const getGeostoreId = createThunkAction(
'getGeostoreId',
({ geojson, callback }) => (dispatch) => {
if (geojson) {
dispatch(setGeostoreLoading({ loading: true, error: false }));
saveGeostore(geojson)
.then((geostore) => {
if (geostore && geostore.data && geostore.data.data) {
const { id } = geostore.data.data;
if (callback) {
callback(id);
} else {
dispatch(setGeostoreLoading({ loading: false, error: false }));
({ geojson, callback }) =>
(dispatch) => {
if (geojson) {
dispatch(setGeostoreLoading({ loading: true, error: false }));
saveGeostore(geojson)
.then((geostore) => {
if (geostore && geostore.data && geostore.data.data) {
const { id } = geostore.data.data;
if (callback) {
callback(id);
} else {
dispatch(setGeostoreLoading({ loading: false, error: false }));
}
}
}
})
.catch(() => {
setGeostoreLoading({
loading: false,
error: true,
})
.catch(() => {
setGeostoreLoading({
loading: false,
error: true,
});
});
});
}
}
}
);
6 changes: 1 addition & 5 deletions services/geostore.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,7 @@ const fetchGeostoreFromDataApi = ({ adm0, adm1, adm2, token }) => {

export const getGeostore = ({ type, adm0, adm1, adm2, token }) => {
if (!type || !adm0) return null;
// console.log('type', type)
// console.log('adm0', adm0)
// console.log('adm1', adm1)
// console.log('adm2', adm2)
// console.log('token', token)

switch (type) {
case 'country':
return fetchGeostoreFromDataApi({
Expand Down

0 comments on commit 20662b1

Please sign in to comment.