Skip to content

Commit

Permalink
fix(xo-web/backup/restore): don't use UNSAFE_componentWillReceiveProps
Browse files Browse the repository at this point in the history
Introduced by 7d6e832

UNSAFE_componentWillReceiveProps method was only introduced in React 16 but we
are using React 15
.eslintrc: ask eslint to check the React version so that it doesn't suggest to
change it to UNSAFE_componentWillReceiveProps
  • Loading branch information
pdonias committed Aug 10, 2022
1 parent 75a9799 commit fb4de8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

> Users must be able to say: “I had this issue, happy to know it's fixed”
- [Backup/Restore] Fix backup list not loading on page load (PR [#6364](https://github.com/vatesfr/xen-orchestra/pull/6364))

### Packages to release

> When modifying a package, add it here with its release type.
Expand All @@ -30,5 +32,6 @@
- @xen-orchestra/fs minor
- vhd-lib major
- xo-server minor
- xo-web patch

<!--packages-end-->
2 changes: 1 addition & 1 deletion packages/xo-web/src/xo-app/backup/restore/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default class Restore extends Component {
backupDataByVm: {},
}

UNSAFE_componentWillReceiveProps(props) {
componentWillReceiveProps(props) {
if (props.remotes !== this.props.remotes || props.jobs !== this.props.jobs) {
this._refreshBackupList(props.remotes, props.jobs)
}
Expand Down
5 changes: 5 additions & 0 deletions scripts/babel-eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@ module.exports = {
},
},
],
settings: {
react: {
version: 'detect',
},
},
}

0 comments on commit fb4de8f

Please sign in to comment.