Skip to content

Commit

Permalink
refactor: using FetchTogglesStatus enum
Browse files Browse the repository at this point in the history
  • Loading branch information
andreabadesso committed Feb 1, 2024
1 parent df80ada commit f36b7a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sagas/featureToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { Platform } from 'react-native';
import VersionNumber from 'react-native-version-number';
import UnleashClient from 'hathor-unleash-client';
import UnleashClient, { FetchTogglesStatus } from 'hathor-unleash-client';

Check failure on line 10 in src/sagas/featureToggle.js

View workflow job for this annotation

GitHub Actions / test (16.x)

Unable to resolve path to module 'hathor-unleash-client'
import { get } from 'lodash';

import {
Expand Down Expand Up @@ -69,7 +69,7 @@ export function* fetchTogglesRoutine() {
// This call always make unleash to emit the event 'UPDATE',
// which by its turn triggers the action 'FEATURE_TOGGLE_UPDATE'
const state = yield call(() => unleashClient.fetchToggles());
if (state === 'Updated') {
if (state === FetchTogglesStatus.Updated) {
yield put({ type: types.FEATURE_TOGGLE_UPDATE });
}
} catch (e) {
Expand Down

0 comments on commit f36b7a3

Please sign in to comment.