Skip to content

Commit

Permalink
fix: display dependencies external package name
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Apr 18, 2021
1 parent f492561 commit b558ada
Showing 1 changed file with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@ export const ComponentExternalDependencies: FC<ComponentExternalDependenciesProp
peer: boolean;
};
const componentPackage = usePackage(component?.package);
const {
privateNpm,
dependencies = {},
devDependencies = {},
peerDependencies = {},
} = componentPackage || {};
const { dependencies = {}, devDependencies = {}, peerDependencies = {} } =
componentPackage || {};
const { externalDependencies: imports = {} } = component || {};
const columns = useMemo(
() =>
Expand All @@ -40,14 +36,13 @@ export const ComponentExternalDependencies: FC<ComponentExternalDependenciesProp
row: {
original: { name },
},
}: any) =>
privateNpm !== true ? (
<PackageLink
name={name}
dependencies={dependencies}
devDependencies={devDependencies}
/>
) : null,
}: any) => (
<PackageLink
name={name}
dependencies={dependencies}
devDependencies={devDependencies}
/>
),
},
{
Header: 'imports',
Expand Down Expand Up @@ -80,7 +75,7 @@ export const ComponentExternalDependencies: FC<ComponentExternalDependenciesProp
Cell: ({ value }: { value: boolean }) => (value ? '*' : ''),
},
] as Column<DataType>[],
[privateNpm, dependencies, devDependencies],
[dependencies, devDependencies],
);
const rows: DataType[] = useMemo(() => {
const dependenciesKeys = Object.keys(dependencies);
Expand Down

0 comments on commit b558ada

Please sign in to comment.