Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit fe9785c

Browse files
authored
Merge pull request #3322 from withspectrum/remove-console-warn-amplitude
Remove amplitude console warns
2 parents 0dabf71 + 89964f0 commit fe9785c

File tree

4 files changed

+0
-11
lines changed

4 files changed

+0
-11
lines changed

shared/clients/analytics/raven.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,4 @@ if (
99
whitelistUrls: [/spectrum\.chat/, /www\.spectrum\.chat/],
1010
environment: process.env.NODE_ENV,
1111
}).install();
12-
} else {
13-
console.warn('Raven not enabled locally');
1412
}

shared/clients/analytics/setUser.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import type { Amplitude } from './';
33

44
export const createSetUser = (amplitude: Amplitude) => (userId: string) => {
55
if (!amplitude) {
6-
console.warn('No amplitude function attached to window');
76
return;
87
}
98

@@ -13,12 +12,10 @@ export const createSetUser = (amplitude: Amplitude) => (userId: string) => {
1312
: process.env.AMPLITUDE_API_KEY_DEVELOPMENT;
1413

1514
if (!AMPLITUDE_API_KEY) {
16-
// console.warn(`[Amplitude Dev] Set user ${userId}`);
1715
return;
1816
}
1917

2018
const amplitudePromise = () => {
21-
// console.warn(`[Amplitude] Set user ${userId}`);
2219
return amplitude.getInstance().setUserId(userId);
2320
};
2421

shared/clients/analytics/track.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export const createTrack = (amplitude: Amplitude, client: AmplitudeClient) => (
66
eventProperties?: Object = {}
77
) => {
88
if (!amplitude) {
9-
console.warn('No amplitude function attached to window');
109
return;
1110
}
1211

@@ -16,12 +15,10 @@ export const createTrack = (amplitude: Amplitude, client: AmplitudeClient) => (
1615
: process.env.AMPLITUDE_API_KEY_DEVELOPMENT;
1716

1817
if (!AMPLITUDE_API_KEY) {
19-
// console.warn(`[Amplitude Dev] Tracking ${eventType}`);
2018
return;
2119
}
2220

2321
const amplitudePromise = () => {
24-
// console.warn(`[Amplitude] Tracking ${eventType}`);
2522
return amplitude.getInstance().logEvent(eventType, {
2623
...eventProperties,
2724
client,

shared/clients/analytics/unsetUser.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import type { Amplitude } from './';
33

44
export const createUnsetUser = (amplitude: Amplitude) => () => {
55
if (!amplitude) {
6-
console.warn('No amplitude function attached to window');
76
return;
87
}
98

@@ -13,12 +12,10 @@ export const createUnsetUser = (amplitude: Amplitude) => () => {
1312
: process.env.AMPLITUDE_API_KEY_DEVELOPMENT;
1413

1514
if (!AMPLITUDE_API_KEY) {
16-
// console.warn(`[Amplitude Dev] Unset user`);
1715
return;
1816
}
1917

2018
const amplitudePromise = () => {
21-
// console.warn('[Amplitude] Unset user');
2219
return amplitude.getInstance().setUserId(null);
2320
};
2421

0 commit comments

Comments
 (0)