• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

decentraland / marketplace / 9665383386

25 Jun 2024 03:31PM UTC coverage: 66.486% (-0.1%) from 66.593%
9665383386

Pull #2264

github

meelrossi
remove locations saga
Pull Request #2264: feat: update decentraland-dapps v23.1.0

2602 of 5072 branches covered (51.3%)

Branch coverage included in aggregate %.

7593 of 10262 relevant lines covered (73.99%)

77.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

57.14
/webapp/src/modules/proximity/reducer.ts
1
import { LoadingState, loadingReducer } from 'decentraland-dapps/dist/modules/loading/reducer'
33✔
2
import {
3
  FetchProximityRequestAction,
4
  FetchProximitySuccessAction,
5
  FetchProximityFailureAction,
6
  FETCH_PROXIMITY_REQUEST,
7
  FETCH_PROXIMITY_SUCCESS,
8
  FETCH_PROXIMITY_FAILURE
9
} from './actions'
33✔
10
import { Proximity } from './types'
11

12
type ProximityState = {
13
  data: Record<string, Proximity>
14
  loading: LoadingState
15
  error: string | null
16
}
17

18
const INITIAL_STATE: ProximityState = {
33✔
19
  data: {},
20
  loading: [],
21
  error: null
22
}
23

24
type ProximityReducerAction = FetchProximityRequestAction | FetchProximitySuccessAction | FetchProximityFailureAction
25

26
export function proximityReducer(state = INITIAL_STATE, action: ProximityReducerAction) {
301✔
27
  switch (action.type) {
2,197!
28
    case FETCH_PROXIMITY_REQUEST: {
29
      return {
×
30
        ...state,
31
        loading: loadingReducer(state.loading, action)
32
      }
33
    }
34
    case FETCH_PROXIMITY_SUCCESS: {
35
      return {
×
36
        ...state,
37
        loading: loadingReducer(state.loading, action),
38
        error: null,
39
        data: action.payload.proximity
40
      }
41
    }
42
    case FETCH_PROXIMITY_FAILURE: {
43
      return {
×
44
        ...state,
45
        loading: loadingReducer(state.loading, action),
46
        error: action.payload.error
47
      }
48
    }
49
    default:
50
      return state
2,197✔
51
  }
52
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc