Skip to content

Commit 50aa76f

Browse files
committed
fix: review fixes
1 parent 7f57a43 commit 50aa76f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/QueriesActivityBar/QueriesActivityBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function QueriesActivityBar({tenantName}: QueriesActivityBarProps) {
5555
);
5656

5757
// Fetch latency data for header metrics
58-
const {currentData: latencyData} = chartApi.useGetChartDataQuery(
58+
const {data: latencyData} = chartApi.useGetChartDataQuery(
5959
{
6060
database: tenantName,
6161
metrics: [{target: 'queries.latencies.p99'}],

src/components/QueriesActivityBar/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const calculateQueriesPerSecond = (data?: (number | null)[]): MetricCalcu
4141
if (previous > 0) {
4242
const change = current - previous;
4343
trend = {
44-
value: Math.abs(change) || FALLBACK_VALUE,
44+
value: Math.abs(change),
4545
direction: change >= 0 ? TrendDirection.Up : TrendDirection.Down,
4646
};
4747
} else {
@@ -77,7 +77,7 @@ export const calculateLatency = (data?: (number | null)[]): MetricCalculationRes
7777
if (previous > 0) {
7878
const change = current - previous;
7979
trend = {
80-
value: Math.abs(change) || FALLBACK_VALUE,
80+
value: Math.abs(change),
8181
direction: change >= 0 ? TrendDirection.Up : TrendDirection.Down,
8282
};
8383
} else {

0 commit comments

Comments
 (0)