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 getActiveKey = (): string => {
|
||||
if (tab === null) {
|
||||
switch (tab) {
|
||||
case null: {
|
||||
return overMetrics;
|
||||
}
|
||||
|
||||
if (tab === dbCallMetrics) {
|
||||
case dbCallMetrics: {
|
||||
return dbCallMetrics;
|
||||
}
|
||||
|
||||
if (tab === externalMetrics) {
|
||||
case externalMetrics: {
|
||||
return externalMetrics;
|
||||
}
|
||||
|
||||
default: {
|
||||
return overMetrics;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const activeKey = getActiveKey();
|
||||
|
Loading…
x
Reference in New Issue
Block a user