fix(xo-web): dont warn when restoring XO config (#5872)

This commit is contained in:
Pierre Donias 2021-08-12 09:52:45 +02:00 committed by GitHub
parent d3cb31f1a7
commit f5473236d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -30,7 +30,7 @@ const restore = entry =>
title: _('restoreMetadataBackupTitle', {
item: `${entry.type} (${entry.label})`,
}),
body: <RestoreMetadataBackupModalBody backups={entry.backups} />,
body: <RestoreMetadataBackupModalBody backups={entry.backups} type={entry.type} />,
icon: 'restore',
}).then(backup => {
if (backup === undefined) {

View File

@ -18,6 +18,7 @@ const restorationWarning = (
export default class RestoreMetadataBackupModalBody extends Component {
static propTypes = {
backups: PropTypes.array,
type: PropTypes.string,
}
get value() {
@ -53,7 +54,7 @@ export default class RestoreMetadataBackupModalBody extends Component {
/>
</Col>
</SingleLineRow>
<SingleLineRow>{restorationWarning}</SingleLineRow>
{this.props.type !== 'XO' && <SingleLineRow>{restorationWarning}</SingleLineRow>}
</Container>
)
}