cleaner
This commit is contained in:
parent
ec600bb8c8
commit
b47bd7e8b6
3 changed files with 3 additions and 19 deletions
|
@ -16,7 +16,7 @@ COMMENT_SERVER_NAME=Odysee
|
||||||
SEARCH_SERVER_API=https://lighthouse.odysee.com/search
|
SEARCH_SERVER_API=https://lighthouse.odysee.com/search
|
||||||
SOCKETY_SERVER_API=wss://sockety.odysee.com/ws
|
SOCKETY_SERVER_API=wss://sockety.odysee.com/ws
|
||||||
THUMBNAIL_CDN_URL=https://image-processor.vanwanet.com/optimize/
|
THUMBNAIL_CDN_URL=https://image-processor.vanwanet.com/optimize/
|
||||||
WELCOME_VERSION=1.3
|
WELCOME_VERSION=1.2
|
||||||
|
|
||||||
# STRIPE
|
# STRIPE
|
||||||
# STRIPE_PUBLIC_KEY='pk_test_NoL1JWL7i1ipfhVId5KfDZgo'
|
# STRIPE_PUBLIC_KEY='pk_test_NoL1JWL7i1ipfhVId5KfDZgo'
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import { DOMAIN } from 'config';
|
import { DOMAIN } from 'config';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { doSetDaemonSetting } from 'redux/actions/settings';
|
import { doSetDaemonSetting } from 'redux/actions/settings';
|
||||||
import { doSetWelcomeVersion, doToggle3PAnalytics, doSignOut } from 'redux/actions/app';
|
import { doSignOut } from 'redux/actions/app';
|
||||||
import * as DAEMON_SETTINGS from 'constants/daemon_settings';
|
import * as DAEMON_SETTINGS from 'constants/daemon_settings';
|
||||||
import { WELCOME_VERSION } from 'config.js';
|
|
||||||
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||||
import { doAuthenticate } from 'redux/actions/user';
|
import { doAuthenticate } from 'redux/actions/user';
|
||||||
import { version as appVersion } from 'package.json';
|
import { version as appVersion } from 'package.json';
|
||||||
|
@ -15,9 +14,7 @@ const select = (state) => ({
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = (dispatch) => ({
|
const perform = (dispatch) => ({
|
||||||
setWelcomeVersion: (version) => dispatch(doSetWelcomeVersion(version || WELCOME_VERSION)),
|
|
||||||
setShareDataInternal: (share) => dispatch(doSetDaemonSetting(DAEMON_SETTINGS.SHARE_USAGE_DATA, share)),
|
setShareDataInternal: (share) => dispatch(doSetDaemonSetting(DAEMON_SETTINGS.SHARE_USAGE_DATA, share)),
|
||||||
setShareDataThirdParty: (share) => dispatch(doToggle3PAnalytics(share)),
|
|
||||||
signOut: () => dispatch(doSignOut()),
|
signOut: () => dispatch(doSignOut()),
|
||||||
authenticateIfSharingData: () =>
|
authenticateIfSharingData: () =>
|
||||||
dispatch(doAuthenticate(appVersion, undefined, undefined, true, undefined, undefined, DOMAIN)),
|
dispatch(doAuthenticate(appVersion, undefined, undefined, true, undefined, undefined, DOMAIN)),
|
||||||
|
|
|
@ -12,42 +12,29 @@ const LIMITED = 'limited';
|
||||||
const NONE = 'none';
|
const NONE = 'none';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
setWelcomeVersion: (number) => void,
|
|
||||||
signOut: () => void,
|
signOut: () => void,
|
||||||
setShareDataInternal: (boolean) => void,
|
setShareDataInternal: (boolean) => void,
|
||||||
setShareDataThirdParty: (boolean) => void,
|
|
||||||
authenticated: boolean,
|
authenticated: boolean,
|
||||||
authenticateIfSharingData: () => void,
|
authenticateIfSharingData: () => void,
|
||||||
handleNextPage: () => void,
|
handleNextPage: () => void,
|
||||||
};
|
};
|
||||||
|
|
||||||
function PrivacyAgreement(props: Props) {
|
function PrivacyAgreement(props: Props) {
|
||||||
const {
|
const { setShareDataInternal, authenticated, signOut, authenticateIfSharingData, handleNextPage } = props;
|
||||||
setShareDataInternal,
|
|
||||||
setShareDataThirdParty,
|
|
||||||
authenticated,
|
|
||||||
signOut,
|
|
||||||
authenticateIfSharingData,
|
|
||||||
handleNextPage,
|
|
||||||
} = props;
|
|
||||||
const [share, setShare] = useState(undefined); // preload
|
const [share, setShare] = useState(undefined); // preload
|
||||||
|
|
||||||
function handleSubmit() {
|
function handleSubmit() {
|
||||||
if (share === LIMITED) {
|
if (share === LIMITED) {
|
||||||
setShareDataInternal(true);
|
setShareDataInternal(true);
|
||||||
setShareDataThirdParty(false);
|
|
||||||
} else {
|
} else {
|
||||||
setShareDataInternal(false);
|
setShareDataInternal(false);
|
||||||
setShareDataThirdParty(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (share === LIMITED) {
|
if (share === LIMITED) {
|
||||||
authenticateIfSharingData();
|
authenticateIfSharingData();
|
||||||
}
|
}
|
||||||
|
|
||||||
// setWelcomeVersion(WELCOME_VERSION);
|
|
||||||
handleNextPage();
|
handleNextPage();
|
||||||
// history.replace(`/`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue