Skip to content

Commit

Permalink
[KeyValuesTable]: replace defaultProps with destructuring (#2666)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- Part of #2596

## Description of the changes
- Removed defaultprops from KeyValuesTable

## How was this change tested?
- npm ci 
- npm test

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `npm run lint` and `npm run test`

Signed-off-by: Abhishek <[email protected]>
  • Loading branch information
its-me-abhishek authored Feb 14, 2025
1 parent df2cfe8 commit cc7ba5a
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,11 @@ function formatValue(key: string, value: any) {
}

export const LinkValue = (props: { href: string; title?: string; children: React.ReactNode }) => (
<a href={props.href} title={props.title} target="_blank" rel="noopener noreferrer">
<a href={props.href} title={props.title || ''} target="_blank" rel="noopener noreferrer">
{props.children} <IoOpenOutline className="KeyValueTable--linkIcon" />
</a>
);

LinkValue.defaultProps = {
title: '',
};

const linkValueList = (links: Link[]) => {
const dropdownItems = links.map(({ text, url }, index) => ({
label: <LinkValue href={url}>{text}</LinkValue>,
Expand Down

0 comments on commit cc7ba5a

Please sign in to comment.