{"size": 1038, "ext": "js", "max_stars_repo_path": "src/components/modals/ResetModal.js", "max_stars_repo_name": "schwartzadev/spotify-release-list", "max_stars_repo_stars_event_min_datetime": "2019-12-10T09:48:22.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-28T15:54:38.000Z", "max_issues_repo_path": "src/components/modals/ResetModal.js", "max_issues_repo_name": "schwartzadev/spotify-release-list", "max_issues_repo_issues_event_min_datetime": "2020-01-02T16:53:03.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-26T00:50:59.000Z", "max_forks_repo_path": "src/components/modals/ResetModal.js", "max_forks_repo_name": "jakubito/spotify-release-list-web", "max_forks_repo_forks_event_min_datetime": "2021-04-20T10:59:41.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-06T15:24:41.000Z"}
{"max_stars_count": 104, "max_issues_count": 30, "max_forks_count": 7, "avg_line_length": 27.3157894737, "max_line_length": 86, "alphanum_fraction": 0.5789980732}
import { useModal } from 'hooks'
import { Button } from 'components/common'

/**
 * Render reset data modal
 *
 * @param {{ closeModal: () => void, resetData: () => void }} props
 */
function ResetModal({ closeModal, resetData }) {
  useModal(closeModal)

  return (
    <div className="ResetModal modal is-active">
      <div className="modal-background" onClick={closeModal} />
      <div className="modal-content has-background-black-bis has-text-light fade-in">
        <h4 className="title is-4 has-text-light has-text-centered">Are you sure?</h4>
        <div className="has-text-centered">
          <Button
            title="Go back"
            icon="fas fa-arrow-left"
            className="ResetModal__button"
            onClick={closeModal}
          />
          <Button
            title="Delete app data"
            icon="fas fa-trash-alt"
            className="ResetModal__button"
            onClick={resetData}
            danger
          />
        </div>
      </div>
    </div>
  )
}

export default ResetModal
