@@ -28,6 +28,7 @@ const propTypes = {
2828 closeUpsertCharacterModal : PropTypes . func . isRequired ,
2929 closeUpsertPublicViewModal : PropTypes . func . isRequired ,
3030 closeUpsertThreadModal : PropTypes . func . isRequired ,
31+ closeDeleteAccountConfirmationModal : PropTypes . func . isRequired ,
3132 deletePublicView : PropTypes . func . isRequired ,
3233 isBulkUntrackThreadsModalOpen : PropTypes . bool . isRequired ,
3334 isBulkUpdateTagModalOpen : PropTypes . bool . isRequired ,
@@ -38,6 +39,7 @@ const propTypes = {
3839 isUpsertCharacterModalOpen : PropTypes . bool . isRequired ,
3940 isUpsertPublicViewModalOpen : PropTypes . bool . isRequired ,
4041 isUpsertThreadModalOpen : PropTypes . bool . isRequired ,
42+ isDeleteAccountConfirmationModalOpen : PropTypes . bool . isRequired ,
4143 sortedCharacters : PropTypes . arrayOf ( PropTypes . shape ( { } ) ) . isRequired ,
4244 sortedTags : PropTypes . arrayOf ( PropTypes . string ) . isRequired ,
4345 threadToEdit : PropTypes . shape ( {
@@ -48,6 +50,7 @@ const propTypes = {
4850 upsertCharacter : PropTypes . func . isRequired ,
4951 upsertPublicView : PropTypes . func . isRequired ,
5052 upsertThread : PropTypes . func . isRequired ,
53+ submitUserAccountDeletion : PropTypes . func . isRequired ,
5154 tagToEdit : PropTypes . shape ( {
5255 selectedTag : PropTypes . string ,
5356 updatedValue : PropTypes . string
@@ -71,6 +74,7 @@ function mapStateToProps(state) {
7174 isDeletePublicViewModalOpen : ui . isDeletePublicViewModalOpen ,
7275 isBulkUpdateTagModalOpen : ui . isBulkUpdateTagModalOpen ,
7376 isBulkDeleteTagModalOpen : ui . isBulkDeleteTagModalOpen ,
77+ isDeleteAccountConfirmationModalOpen : ui . isDeleteAccountConfirmationModalOpen ,
7478 characterToEdit,
7579 threadToEdit,
7680 bulkThreadsToEdit,
@@ -97,6 +101,7 @@ const ModalContainer = (props) => {
97101 closeUpsertCharacterModal,
98102 closeUpsertPublicViewModal,
99103 closeUpsertThreadModal,
104+ closeDeleteAccountConfirmationModal,
100105 deletePublicView,
101106 isBulkUntrackThreadsModalOpen,
102107 isBulkUpdateTagModalOpen,
@@ -107,6 +112,7 @@ const ModalContainer = (props) => {
107112 isUpsertCharacterModalOpen,
108113 isUpsertPublicViewModalOpen,
109114 isUpsertThreadModalOpen,
115+ isDeleteAccountConfirmationModalOpen,
110116 sortedCharacters,
111117 sortedTags,
112118 threadToEdit,
@@ -116,7 +122,8 @@ const ModalContainer = (props) => {
116122 upsertPublicView,
117123 upsertThread,
118124 viewToEdit,
119- tagToEdit
125+ tagToEdit,
126+ submitUserAccountDeletion
120127 } = props ;
121128 return (
122129 < div >
@@ -231,6 +238,22 @@ const ModalContainer = (props) => {
231238 </ span >
232239 }
233240 />
241+ < GenericConfirmationModal
242+ isModalOpen = { isDeleteAccountConfirmationModalOpen }
243+ submitCallback = { submitUserAccountDeletion }
244+ submitButtonText = "Confirm Deletion"
245+ closeCallback = { closeDeleteAccountConfirmationModal }
246+ closeButtonText = "Cancel"
247+ data = { null }
248+ headerText = "Really Delete Account?"
249+ bodyText = {
250+ < span >
251+ Are you sure you want to delete your account? < strong > This action cannot be undone.</ strong > { ' ' }
252+ You will be unable to access any tracked characters or threads in the future,{ ' ' }
253+ unless you create a new account and re-add them.
254+ </ span >
255+ }
256+ />
234257 </ div >
235258 ) ;
236259} ;
@@ -249,7 +272,9 @@ export default connect(mapStateToProps, {
249272 closeUpsertCharacterModal : actions . closeUpsertCharacterModal ,
250273 closeUpsertPublicViewModal : actions . closeUpsertPublicViewModal ,
251274 closeUpsertThreadModal : actions . closeUpsertThreadModal ,
275+ closeDeleteAccountConfirmationModal : actions . closeDeleteAccountConfirmationModal ,
252276 deletePublicView : actions . deletePublicView ,
277+ submitUserAccountDeletion : actions . submitUserAccountDeletion ,
253278 untrackCharacter : actions . untrackCharacter ,
254279 untrackThread : actions . untrackThread ,
255280 upsertCharacter : actions . upsertCharacter ,
0 commit comments