import PropTypes from 'prop-types' import { Button, Flex, Typography, Card } from 'antd' import TimeDisplay from '../../common/TimeDisplay' import FarmControlAppIcon from '../../../Logos/FarmControlAppIcon' const { Text, Title } = Typography const NewAppUpdate = ({ update, onCancel, onUpdate }) => { const artifacts = Array.isArray(update?.artifacts) ? update.artifacts : [] const primaryArtifact = artifacts.find((artifact) => artifact.url) return ( A new Farm Control update is available. Would you like to update now? {'Farm Control UI'} Version:{' '} {update?.version ? `v${update.version}` : 'Unknown'} Build Number:{' '} {update?.buildNumber ? `b${update.buildNumber}` : 'Unknown'} Branch: {update?.branch || 'Unknown'} Built at: ) } NewAppUpdate.propTypes = { update: PropTypes.object, onCancel: PropTypes.func.isRequired, onUpdate: PropTypes.func.isRequired } export default NewAppUpdate