Skip to content

Commit

Permalink
remove debug
Browse files Browse the repository at this point in the history
  • Loading branch information
oriefrati committed Jan 14, 2024
1 parent 94785c0 commit ffbab29
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/client/Locomotion/src/services/Mixpanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
import Config from 'react-native-config';
import { Mixpanel } from 'mixpanel-react-native';
import { getUniqueId } from 'react-native-device-info';
import { Alert } from 'react-native';
import { getDeviceId } from './device';

const { MIXPANEL_EVENTS_NUMBER } = Config;

export const getElementName = props => props.testID || props.id;

const getRandomNumberByUuid = (uuid) => {
Expand All @@ -18,15 +19,12 @@ const getRandomNumberByUuid = (uuid) => {
}
};

const { MIXPANEL_EVENTS_NUMBER } = Config;

const shouldTrackEvents = () => {
if (!MIXPANEL_EVENTS_NUMBER) {
return true;
}
const deviceUuid = getUniqueId();
const number = getRandomNumberByUuid(deviceUuid);
Alert.alert(deviceUuid, number.toString());
return number <= parseInt(MIXPANEL_EVENTS_NUMBER, 10);
};

Expand Down

0 comments on commit ffbab29

Please sign in to comment.