Simplify passing similar props
This commit is contained in:
@@ -29,9 +29,6 @@ export function AlertTablePathRow(props: Props) {
|
||||
resultIndex,
|
||||
currentPathExpanded,
|
||||
selectedItem,
|
||||
databaseUri,
|
||||
sourceLocationPrefix,
|
||||
updateSelectionCallback,
|
||||
toggleExpanded,
|
||||
scroller,
|
||||
} = props;
|
||||
@@ -71,15 +68,9 @@ export function AlertTablePathRow(props: Props) {
|
||||
path.locations.map((step, pathNodeIndex) => (
|
||||
<AlertTablePathNodeRow
|
||||
key={`${resultIndex}-${pathIndex}-${pathNodeIndex}`}
|
||||
{...props}
|
||||
step={step}
|
||||
pathNodeIndex={pathNodeIndex}
|
||||
pathIndex={pathIndex}
|
||||
resultIndex={resultIndex}
|
||||
selectedItem={selectedItem}
|
||||
databaseUri={databaseUri}
|
||||
sourceLocationPrefix={sourceLocationPrefix}
|
||||
updateSelectionCallback={updateSelectionCallback}
|
||||
scroller={scroller}
|
||||
/>
|
||||
))}
|
||||
</>
|
||||
|
||||
@@ -112,18 +112,12 @@ export function AlertTableResultRow(props: Props) {
|
||||
Keys.getAllPaths(result).map((path, pathIndex) => (
|
||||
<AlertTablePathRow
|
||||
key={`${resultIndex}-${pathIndex}`}
|
||||
{...props}
|
||||
path={path}
|
||||
pathIndex={pathIndex}
|
||||
resultIndex={resultIndex}
|
||||
currentPathExpanded={expanded.has(
|
||||
Keys.keyToString({ resultIndex, pathIndex }),
|
||||
)}
|
||||
selectedItem={selectedItem}
|
||||
databaseUri={databaseUri}
|
||||
sourceLocationPrefix={sourceLocationPrefix}
|
||||
updateSelectionCallback={updateSelectionCallback}
|
||||
toggleExpanded={toggleExpanded}
|
||||
scroller={scroller}
|
||||
/>
|
||||
))}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user