mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-29 19:12:02 +08:00
fix: getActiveKey is refactoring into switch
This commit is contained in:
parent
1315b43aad
commit
c77ad88f90
@ -55,19 +55,20 @@ function ServiceMetrics(): JSX.Element {
|
|||||||
const externalMetrics = 'External Calls';
|
const externalMetrics = 'External Calls';
|
||||||
|
|
||||||
const getActiveKey = (): string => {
|
const getActiveKey = (): string => {
|
||||||
if (tab === null) {
|
switch (tab) {
|
||||||
return overMetrics;
|
case null: {
|
||||||
|
return overMetrics;
|
||||||
|
}
|
||||||
|
case dbCallMetrics: {
|
||||||
|
return dbCallMetrics;
|
||||||
|
}
|
||||||
|
case externalMetrics: {
|
||||||
|
return externalMetrics;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
return overMetrics;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tab === dbCallMetrics) {
|
|
||||||
return dbCallMetrics;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tab === externalMetrics) {
|
|
||||||
return externalMetrics;
|
|
||||||
}
|
|
||||||
|
|
||||||
return overMetrics;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const activeKey = getActiveKey();
|
const activeKey = getActiveKey();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user