Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Tackett <tackadam@amazon.com>
  • Loading branch information
Adam Tackett committed Oct 25, 2024
1 parent d12b5cb commit f3eb11b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
EuiIcon,
EuiPopover,
EuiPopoverTitle,
EuiSpacer,
EuiTextColor,
} from '@elastic/eui';
import React, { useMemo, useState } from 'react';
Expand Down Expand Up @@ -225,12 +226,15 @@ export function Filters(props: FiltersOwnProps) {
const filterComponents = useMemo(() => renderFilters(), [props.filters]);

Check warning on line 226 in public/components/trace_analytics/components/common/filters/filters.tsx

View workflow job for this annotation

GitHub Actions / Lint

React Hook useMemo has a missing dependency: 'renderFilters'. Either include it or remove the dependency array

return props.filters.length > 0 ? (
<EuiFlexGroup gutterSize="s" alignItems="center" responsive={false}>
{filterComponents}
<EuiFlexItem grow={false}>
<AddFilterButton />
</EuiFlexItem>
</EuiFlexGroup>
<>
<EuiSpacer size="s" />
<EuiFlexGroup gutterSize="s" alignItems="center" responsive={false}>
{filterComponents}
<EuiFlexItem grow={false}>
<AddFilterButton />
</EuiFlexItem>
</EuiFlexGroup>
</>
) : null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ export function ServicesContent(props: ServicesProps) {
/>
</EuiFlexItem>
</EuiFlexGroup>
{props.filters.length > 0 && <EuiSpacer size="s" />}
<Filters
page={page}
filters={filters}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ export function TracesContent(props: TracesProps) {
/>
</EuiFlexItem>
</EuiFlexGroup>
{props.filters.length > 0 && <EuiSpacer size="s" />}
<Filters
page={page}
filters={filters}
Expand Down
2 changes: 1 addition & 1 deletion public/components/trace_analytics/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export const Home = (props: HomeProps) => {
path: tracesPath + '?datasourceId=' + dataSourceMDSId[0].id,
});
} else {
location.assign(tracesPath);
location.assign(tracesPath + '?datasourceId=' + dataSourceMDSId[0].id);
}

setTracesTableMode('traces');
Expand Down

0 comments on commit f3eb11b

Please sign in to comment.