import PropTypes from 'prop-types'; import React from 'react'; import { kinds } from 'Helpers/Props'; import FieldSet from 'Components/FieldSet'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; import Button from 'Components/Link/Button'; import ModalContent from 'Components/Modal/ModalContent'; import ModalHeader from 'Components/Modal/ModalHeader'; import ModalBody from 'Components/Modal/ModalBody'; import ModalFooter from 'Components/Modal/ModalFooter'; import UpdateChanges from 'System/Updates/UpdateChanges'; import styles from './AppUpdatedModalContent.css'; function AppUpdatedModalContent(props) { const { version, isPopulated, error, items, onSeeChangesPress, onModalClose } = props; const update = items[0]; return ( Sonarr Updated
Version {version} of Sonarr has been installed, in order to get the latest changes you'll need to reload Sonarr.
{ isPopulated && !error && !!update &&
{ !update.changes &&
Maintenance release
} { !!update.changes &&
What's new?
}
} { !isPopulated && !error && }
); } AppUpdatedModalContent.propTypes = { isOpen: PropTypes.bool.isRequired, version: PropTypes.string.isRequired, isPopulated: PropTypes.bool.isRequired, error: PropTypes.object.isRequired, items: PropTypes.arrayOf(PropTypes.object).isRequired, onSeeChangesPress: PropTypes.func.isRequired, onModalClose: PropTypes.func.isRequired }; export default AppUpdatedModalContent;