1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 14:50:29 +00:00

fix warnings and rename unsafe lifecycle function (#5814)

This commit is contained in:
Michael An
2023-12-06 17:24:05 +08:00
committed by GitHub
parent a9a8fea273
commit 429eecdd06
50 changed files with 89 additions and 91 deletions

View File

@@ -23,7 +23,7 @@ class Rename extends React.Component {
this.newInput = React.createRef();
}
componentWillMount() {
UNSAFE_componentWillMount() {
this.setState({newName: this.props.dirent.name});
}
@@ -32,7 +32,7 @@ class Rename extends React.Component {
this.changeState(dirent);
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
this.changeState(nextProps.dirent);
}