Hide membership debug logs behind a flag

General error logs are ok, but not logs like these ... not helpful for other devs.
This commit is contained in:
infinite-persistence 2022-05-23 10:22:58 +08:00
parent 8e08320e7d
commit 676f461a9f
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -18,17 +18,19 @@ import I18nMessage from 'component/i18nMessage';
import useGetUserMemberships from 'effects/use-get-user-memberships';
import usePersistedState from 'effects/use-persisted-state';
let stripeEnvironment = getStripeEnvironment();
const stripeEnvironment = getStripeEnvironment();
const isDev = process.env.NODE_ENV !== 'production';
let log = (input) => {};
if (isDev) log = console.log;
// odysee channel information since the memberships are only for Odysee
const odyseeChannelId = '80d2590ad04e36fb1d077a9b9e3a8bba76defdf8';
const odyseeChannelName = '@odysee';
function log(...args) {
// @if process.env.LOG_MEMBERSHIP='true'
console.log(args);
// @endif
}
type Props = {
history: { action: string, push: (string) => void, replace: (string) => void },
location: { search: string, pathname: string },