Skip to content

Commit eebe11e

Browse files
Simplify passing similar props
1 parent bd5d361 commit eebe11e

2 files changed

Lines changed: 2 additions & 17 deletions

File tree

extensions/ql-vscode/src/view/results/AlertTablePathRow.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ export function AlertTablePathRow(props: Props) {
2929
resultIndex,
3030
currentPathExpanded,
3131
selectedItem,
32-
databaseUri,
33-
sourceLocationPrefix,
34-
updateSelectionCallback,
3532
toggleExpanded,
3633
scroller,
3734
} = props;
@@ -71,15 +68,9 @@ export function AlertTablePathRow(props: Props) {
7168
path.locations.map((step, pathNodeIndex) => (
7269
<AlertTablePathNodeRow
7370
key={`${resultIndex}-${pathIndex}-${pathNodeIndex}`}
71+
{...props}
7472
step={step}
7573
pathNodeIndex={pathNodeIndex}
76-
pathIndex={pathIndex}
77-
resultIndex={resultIndex}
78-
selectedItem={selectedItem}
79-
databaseUri={databaseUri}
80-
sourceLocationPrefix={sourceLocationPrefix}
81-
updateSelectionCallback={updateSelectionCallback}
82-
scroller={scroller}
8374
/>
8475
))}
8576
</>

extensions/ql-vscode/src/view/results/AlertTableResultRow.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,18 +112,12 @@ export function AlertTableResultRow(props: Props) {
112112
Keys.getAllPaths(result).map((path, pathIndex) => (
113113
<AlertTablePathRow
114114
key={`${resultIndex}-${pathIndex}`}
115+
{...props}
115116
path={path}
116117
pathIndex={pathIndex}
117-
resultIndex={resultIndex}
118118
currentPathExpanded={expanded.has(
119119
Keys.keyToString({ resultIndex, pathIndex }),
120120
)}
121-
selectedItem={selectedItem}
122-
databaseUri={databaseUri}
123-
sourceLocationPrefix={sourceLocationPrefix}
124-
updateSelectionCallback={updateSelectionCallback}
125-
toggleExpanded={toggleExpanded}
126-
scroller={scroller}
127121
/>
128122
))}
129123
</>

0 commit comments

Comments
 (0)