Remove unused FIRST_SUBSCRIPTION modal -- it is now just a toast.

This commit is contained in:
infinite-persistence 2022-01-19 21:10:46 +08:00 committed by Thomas Zarebczan
parent fc20f6ab0b
commit 71328274ec
4 changed files with 0 additions and 96 deletions

View file

@ -18,7 +18,6 @@ export const TRANSACTION_FAILED = 'transaction_failed';
export const REWARD_GENERATED_CODE = 'reward_generated_code';
export const AFFIRM_PURCHASE = 'affirm_purchase';
export const CONFIRM_CLAIM_REVOKE = 'confirm_claim_revoke';
export const FIRST_SUBSCRIPTION = 'firstSubscription';
export const SEND_TIP = 'send_tip';
export const CONFIRM_SEND_TIP = 'confirm_send_tip';
export const SOCIAL_SHARE = 'social_share';

View file

@ -1,17 +0,0 @@
import { connect } from 'react-redux';
import { doHideModal } from 'redux/actions/app';
import { selectAccessToken, selectUser } from 'redux/selectors/user';
import { withRouter } from 'react-router';
import ModalFirstSubscription from './view';
const select = state => ({
accessToken: selectAccessToken(state),
user: selectUser(state),
});
const perform = dispatch => () => ({
closeModal: () => dispatch(doHideModal()),
});
export default withRouter(connect(select, perform)(ModalFirstSubscription));

View file

@ -1,73 +0,0 @@
// @flow
import { SITE_NAME } from 'config';
import React from 'react';
import { Modal } from 'modal/modal';
import Button from 'component/button';
import * as PAGES from 'constants/pages';
import Card from 'component/common/card';
type Props = {
closeModal: () => void,
accessToken: string,
user: any,
doAuth: () => void,
history: { push: string => void },
location: UrlLocation,
};
const ModalFirstSubscription = (props: Props) => {
const {
closeModal,
accessToken,
user,
history,
location: { pathname },
} = props;
const title = __('You Followed Your First Channel!');
return (
<Modal type="card" isOpen contentLabel={title}>
<Card
title={title}
subtitle={
<>
{__('Awesome! You just followed your first channel.')}{' '}
{user && user.primary_email
? __('You will receive notifications related to new content.')
: __('Log in with %SITE_NAME% to receive notifications about new content.', { SITE_NAME })}
</>
}
actions={
<div className="section__actions">
<Button button="primary" onClick={closeModal} label={__('Got it')} />
<React.Fragment>
{user && user.primary_email ? (
<React.Fragment>
<Button
button="link"
href={`https://lbry.com/list/edit/${accessToken}`}
label={__('Update email preferences')}
/>
</React.Fragment>
) : (
<React.Fragment>
<Button
button="link"
onClick={() => {
closeModal();
history.push(`/$/${PAGES.AUTH}?redirect=${pathname}`);
}}
label={__('Log in')}
/>
</React.Fragment>
)}
</React.Fragment>
</div>
}
/>
</Modal>
);
};
export default ModalFirstSubscription;

View file

@ -41,9 +41,6 @@ const ModalFileSelection = lazyImport(() =>
);
const ModalFileTimeout = lazyImport(() => import('modal/modalFileTimeout' /* webpackChunkName: "modalFileTimeout" */));
const ModalFirstReward = lazyImport(() => import('modal/modalFirstReward' /* webpackChunkName: "modalFirstReward" */));
const ModalFirstSubscription = lazyImport(() =>
import('modal/modalFirstSubscription' /* webpackChunkName: "modalFirstSubscription" */)
);
const ModalImageUpload = lazyImport(() => import('modal/modalImageUpload' /* webpackChunkName: "modalImageUpload" */));
const ModalMassTipsUnlock = lazyImport(() =>
import('modal/modalMassTipUnlock' /* webpackChunkName: "modalMassTipUnlock" */)
@ -124,8 +121,6 @@ function getModal(id) {
return ModalRevokeClaim;
case MODALS.PHONE_COLLECTION:
return ModalPhoneCollection;
case MODALS.FIRST_SUBSCRIPTION:
return ModalFirstSubscription;
case MODALS.SEND_TIP:
return ModalSendTip;
case MODALS.SOCIAL_SHARE: