0
Fork 0
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:
Meeeeow 2017-12-04 00:36:51 +08:00 committed by juanpicado
parent b2d54e192b
commit 6732d2bdcd

View file

@ -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>
);