Skip to content

Commit fc4dfe2

Browse files
committed
Link to proper tab from transaction id based on event type
1 parent d17542c commit fc4dfe2

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

packages/components/src/internal/renderers/TransactionAuditIdRenderer.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,16 @@ interface Props {
1111
export class TransactionAuditIdRenderer extends PureComponent<Props> {
1212
render(): ReactNode {
1313
const { row } = this.props;
14-
const id = caseInsensitive(row.toJS(), 'transactionId')?.value;
14+
const _row = row.toJS();
15+
const id = caseInsensitive(_row, 'transactionId')?.value;
1516
if (!id) {
1617
return null;
1718
}
18-
return <AppLink to={AppURL.create('audit', id)}>{id}</AppLink>;
19+
let url = AppURL.create('audit', id);
20+
const activeTab = caseInsensitive(_row, 'EventType')?.value.toLowerCase();
21+
if (activeTab) {
22+
url = url.addParam('tab', activeTab);
23+
}
24+
return <AppLink to={url}>{id}</AppLink>;
1925
}
2026
}

0 commit comments

Comments
 (0)