All files / client/components/Admin/User ResetedPasswordModal.tsx

0% Statements 0/2
0% Branches 0/1
0% Functions 0/1
0% Lines 0/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35                                                                     
import React, { FC } from 'react'
import { Modal, ModalHeader, ModalBody, ModalFooter, Button } from 'reactstrap'
 
interface Props {
  isOpen: boolean
  toggle: () => void
  user: any
  password: string
}
 
const ResetedPasswordModal: FC<Props> = ({ isOpen, toggle, user = {}, password }) => {
  return (
    <Modal isOpen={isOpen} toggle={toggle}>
      <ModalHeader toggle={toggle}>Password reset!</ModalHeader>
 
      <ModalBody>
        <p className="alert alert-danger">Let the user know the new password below and strongly recommend to change another one immediately. </p>
        <p>
          Reset user: <code>{user.email}</code>
        </p>
        <p>
          New password: <code>{password}</code>
        </p>
      </ModalBody>
      <ModalFooter>
        <Button color="primary" onClick={toggle}>
          OK
        </Button>
      </ModalFooter>
    </Modal>
  )
}
 
export default ResetedPasswordModal