fix: getActiveKey is refactoring into switch

This commit is contained in:
Palash gupta 2022-05-20 14:12:13 +05:30
parent 1315b43aad
commit c77ad88f90
No known key found for this signature in database
GPG Key ID: 8FD05AE6F9150AD6

View File

@ -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();