feat: updated tos and privacy policy on registration link
intial run at legal links modalpull/3056/head
parent
8dfdd87d0e
commit
b10873c64a
@ -0,0 +1,54 @@
|
|||||||
|
import { noop } from 'lodash';
|
||||||
|
import { useDispatch } from 'react-redux';
|
||||||
|
import { updateTermsOfServicePrivacyModal } from '../../state/ducks/modalDialog';
|
||||||
|
import { SessionWrapperModal } from '../SessionWrapperModal';
|
||||||
|
import { SessionButton, SessionButtonShape, SessionButtonType } from '../basic/SessionButton';
|
||||||
|
|
||||||
|
export type TermsOfServicePrivacyDialogProps = {
|
||||||
|
show: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
export function TermsOfServicePrivacyDialog(props: TermsOfServicePrivacyDialogProps) {
|
||||||
|
const { show } = props;
|
||||||
|
|
||||||
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
|
const onClose = () => {
|
||||||
|
dispatch(updateTermsOfServicePrivacyModal(null));
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!show) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO[epic=ses-900] need to add redux context to initial screens... or at the very least, a separate onboarding redux state
|
||||||
|
return (
|
||||||
|
<SessionWrapperModal
|
||||||
|
title={window.i18n('urlOpen')}
|
||||||
|
onClose={onClose}
|
||||||
|
showExitIcon={true}
|
||||||
|
showHeader={true}
|
||||||
|
>
|
||||||
|
<div className="session-modal__centered">
|
||||||
|
<span className="session-confirm-sub-message">{window.i18n('urlOpenBrowser')}</span>
|
||||||
|
|
||||||
|
<div className="session-modal__button-group">
|
||||||
|
<SessionButton
|
||||||
|
text={window.i18n('termsOfService')}
|
||||||
|
buttonType={SessionButtonType.Simple}
|
||||||
|
buttonShape={SessionButtonShape.Square}
|
||||||
|
onClick={noop}
|
||||||
|
dataTestId="session-tos-button"
|
||||||
|
/>
|
||||||
|
<SessionButton
|
||||||
|
text={window.i18n('privacyPolicy')}
|
||||||
|
buttonType={SessionButtonType.Simple}
|
||||||
|
buttonShape={SessionButtonShape.Square}
|
||||||
|
onClick={noop}
|
||||||
|
dataTestId="session-privacy-policy-button"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</SessionWrapperModal>
|
||||||
|
);
|
||||||
|
}
|
@ -1,9 +1,33 @@
|
|||||||
|
import { useDispatch } from 'react-redux';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
import { updateTermsOfServicePrivacyModal } from '../../state/ducks/modalDialog';
|
||||||
import { SessionHtmlRenderer } from '../basic/SessionHTMLRenderer';
|
import { SessionHtmlRenderer } from '../basic/SessionHTMLRenderer';
|
||||||
|
|
||||||
|
const StyledTermsAndConditions = styled.div`
|
||||||
|
padding-top: var(--margins-md);
|
||||||
|
|
||||||
|
color: var(--text-secondary-color);
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
b {
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--text-primary-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
export const TermsAndConditions = () => {
|
export const TermsAndConditions = () => {
|
||||||
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="session-terms-conditions-agreement">
|
<StyledTermsAndConditions
|
||||||
<SessionHtmlRenderer html={window.i18n('ByUsingThisService...')} />
|
onClick={() => dispatch(updateTermsOfServicePrivacyModal({ show: true }))}
|
||||||
</div>
|
>
|
||||||
|
<SessionHtmlRenderer html={window.i18n('onboardingTosPrivacy')} />
|
||||||
|
</StyledTermsAndConditions>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue