0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-06 22:40:26 -05:00

fix: issue on refactor router

This commit is contained in:
Juan Picado @jotadeveloper 2018-12-16 09:25:20 +01:00
parent 4c2fed677f
commit 19b0f47827
No known key found for this signature in database
GPG key ID: 18AC54485952D158
3 changed files with 5 additions and 4 deletions

View file

@ -10,7 +10,7 @@ import classes from './packageList.scss';
export default class PackageList extends React.Component {
static propTypes = {
packages: PropTypes.array,
help: PropTypes.boolean,
help: PropTypes.bool,
};
renderPackages = () => {

View file

@ -13,7 +13,7 @@ import PackageSidebar from '../../components/PackageSidebar/index';
export default class Detail extends Component {
static propTypes = {
match: PropTypes.object,
isUserLoggedIn: PropTypes.boolean,
isUserLoggedIn: PropTypes.bool,
};
state = {
@ -27,6 +27,7 @@ export default class Detail extends Component {
params.package
}`;
}
get packageName() {
return this.getPackageName();
}

View file

@ -37,10 +37,10 @@ class RouterApp extends Component<IProps, IState> {
return <HomePage isUserLoggedIn={isUserLoggedIn} packages={packages} />;
};
renderDetailPage = () => {
renderDetailPage = (routerProps: any) => {
const { isUserLoggedIn } = this.props;
return <DetailPackage {...this.props} isUserLoggedIn={isUserLoggedIn} />;
return <DetailPackage {...routerProps} isUserLoggedIn={isUserLoggedIn} />;
};
}