@@ -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,23 @@ 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?{ ' ' }
252+ < strong > This action cannot be undone.</ strong > You will be unable to access
253+ any tracked characters or threads in the future, unless you create a new
254+ account and re-add them.
255+ </ span >
256+ }
257+ />
234258 </ div >
235259 ) ;
236260} ;
@@ -249,7 +273,9 @@ export default connect(mapStateToProps, {
249273 closeUpsertCharacterModal : actions . closeUpsertCharacterModal ,
250274 closeUpsertPublicViewModal : actions . closeUpsertPublicViewModal ,
251275 closeUpsertThreadModal : actions . closeUpsertThreadModal ,
276+ closeDeleteAccountConfirmationModal : actions . closeDeleteAccountConfirmationModal ,
252277 deletePublicView : actions . deletePublicView ,
278+ submitUserAccountDeletion : actions . submitUserAccountDeletion ,
253279 untrackCharacter : actions . untrackCharacter ,
254280 untrackThread : actions . untrackThread ,
255281 upsertCharacter : actions . upsertCharacter ,
0 commit comments