mirror of
https://github.com/SomboChea/ui
synced 2024-11-28 08:54:27 +07:00
fix: fix DependencyBlock props interface
This commit is contained in:
parent
b35baa069f
commit
35d691c1e0
@ -96,14 +96,16 @@ class Dependencies extends Component {
|
|||||||
|
|
||||||
const dependencyMap = { dependencies, devDependencies, peerDependencies };
|
const dependencyMap = { dependencies, devDependencies, peerDependencies };
|
||||||
|
|
||||||
const dependencyList = Object.keys(dependencyMap).reduce((result, value, key) => {
|
const dependencyList = Object.keys(dependencyMap).reduce(
|
||||||
const selectedDepndency = dependencyMap[value];
|
(result, value, key) => {
|
||||||
if (selectedDepndency && this.checkDependencyLength(selectedDepndency)) {
|
const selectedDepndency = dependencyMap[value];
|
||||||
// @ts-ignore
|
if (selectedDepndency && this.checkDependencyLength(selectedDepndency)) {
|
||||||
result.push(<DependencyBlock className="dependency-block" dependencies={selectedDepndency} key={key} title={value} />);
|
result.push(<DependencyBlock dependencies={selectedDepndency} key={key} title={value} />);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}, []);
|
},
|
||||||
|
[] as JSX.Element[]
|
||||||
|
);
|
||||||
|
|
||||||
if (dependencyList.length) {
|
if (dependencyList.length) {
|
||||||
return <Fragment>{dependencyList}</Fragment>;
|
return <Fragment>{dependencyList}</Fragment>;
|
||||||
|
Loading…
Reference in New Issue
Block a user