import Button from '@material-ui/core/Button';
import PropTypes from 'prop-types';
import React from 'react';
import { Trans } from '@lingui/macro';
import Typography from '@material-ui/core/Typography';
import { apiErrorPropType } from './util/ApiHelpers.jsx';
import { withContext } from './util/AppContext.jsx';
import { withStyles } from '@material-ui/core/styles';
const styles = theme => ({
version: {
maxWidth: '250px',
padding: theme.spacing(3),
},
versionMsg: {
fontSize: '12px',
},
updateBtn: {
marginTop: theme.spacing(1),
},
});
class Version extends React.Component {
numericVersion = version => {
const parts = version.split('-', 2);
if (parts.length === 2) {
return parts[1];
} else {
return version;
}
}
versionChannel = version => {
const parts = version.split('-', 2);
return parts.length === 2 ? parts[0] : null;
}
renderVersionCheck = () => {
const { classes, latestVersion, error, isLatest } = this.props;
if (!latestVersion) {
return (