Skip to content

Commit

Permalink
Remove defaultProps from AccordianLogs.tsx (#2613)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- Part of #2596 

## Description of the changes
- 

## How was this change tested?
- 

## Checklist
- [ ] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [ ] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [ ] 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: cs-308-2023 <[email protected]>
  • Loading branch information
ADI-ROXX authored Jan 25, 2025
1 parent e4b1908 commit a946fe8
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,24 @@ import './AccordianLogs.css';
type AccordianLogsProps = {
interactive?: boolean;
isOpen: boolean;
linksGetter: ((pairs: KeyValuePair[], index: number) => Link[]) | TNil;
linksGetter?: ((pairs: KeyValuePair[], index: number) => Link[]) | TNil;
logs: Log[];
onItemToggle?: (log: Log) => void;
onToggle?: () => void;
openedItems?: Set<Log>;
timestamp: number;
};

export default function AccordianLogs(props: AccordianLogsProps) {
const { interactive, isOpen, linksGetter, logs, openedItems, onItemToggle, onToggle, timestamp } = props;
export default function AccordianLogs({
interactive = true,
isOpen,
linksGetter,
logs,
openedItems,
onItemToggle,
onToggle,
timestamp,
}: AccordianLogsProps) {
let arrow: React.ReactNode | null = null;
let HeaderComponent: 'span' | 'a' = 'span';
let headerProps: object | null = null;
Expand Down Expand Up @@ -84,11 +92,3 @@ export default function AccordianLogs(props: AccordianLogsProps) {
</div>
);
}

AccordianLogs.defaultProps = {
interactive: true,
linksGetter: undefined,
onItemToggle: undefined,
onToggle: undefined,
openedItems: undefined,
};

0 comments on commit a946fe8

Please sign in to comment.