mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
refactor: 🔨 use destructing
This commit is contained in:
parent
b2d54e192b
commit
6732d2bdcd
1 changed files with 5 additions and 3 deletions
|
@ -59,14 +59,16 @@ export default class Detail extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
if (this.state.notFound) {
|
||||
let {notFound, readMe} = this.state;
|
||||
|
||||
if (notFound) {
|
||||
return <NotFound pkg={this.packageName}/>;
|
||||
} else if (isEmpty(this.state.readMe)) {
|
||||
} else if (isEmpty(readMe)) {
|
||||
return <Loading text={loadingMessage} />;
|
||||
}
|
||||
return (
|
||||
<div className={classes.twoColumn}>
|
||||
<PackageDetail readMe={this.state.readMe} package={this.packageName}/>
|
||||
<PackageDetail readMe={readMe} package={this.packageName}/>
|
||||
<PackageSidebar packageName={this.packageName} />
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue