-
-
- Click the file path below to show the reason in code viewer.
-
-
-
- {data.map((e, i) => {
- const { dependency, module, relativePath } = e!;
- const { statements } = dependency;
- const { start } = statements?.[0]?.position
- ? module.isPreferSource
- ? statements[0].position.source!
- : statements[0].position.transformed
- : { start: { line: 0, column: 0 } };
- const text = `${relativePath}:${start.line}:${
- start.column || 1
- }`;
+ {data.length ? (
+ <>
+
+
+ Click the file path below to show the reason in code viewer.
+
+
+
+ {data.map((e, i) => {
+ const { dependency, module, relativePath } = e!;
+ const { statements } = dependency;
+ const { start } = statements?.[0]?.position
+ ? module.isPreferSource
+ ? statements[0].position.source!
+ : statements[0].position.transformed
+ : { start: { line: 0, column: 0 } };
+ const text = `${relativePath}:${start.line}:${
+ start.column || 1
+ }`;
- return (
-
+ {
+ e.preventDefault();
+ e.stopPropagation();
+ setIndex(i);
+ }}
+ strong={i === index}
+ style={{
+ color: i === index ? Color.Blue : 'inherit',
+ display: 'block',
+ }}
>
- {
- e.preventDefault();
- e.stopPropagation();
- setIndex(i);
- }}
- strong={i === index}
- style={{
- color: i === index ? Color.Blue : 'inherit',
- display: 'block',
- }}
- >
+
{text}
-
-
- );
- })}
-
-
- ) : (
-
- )}
-
+
+
+
+
+ );
+ })}
+
+ >
+ ) : (
+
+ )}