refactor: use useAccount composable

This commit is contained in:
Shivam Mishra
2026-02-04 19:20:14 +05:30
parent a4cee4f72d
commit 9f80c41e75
@@ -1,18 +1,16 @@
import { computed } from 'vue';
import { useStore } from 'dashboard/composables/store';
import { useAccount } from './useAccount';
// Bidirectional alias mapping for consistency
// Alias mapping for consistency (canonical form is reply_time)
const METRIC_ALIASES = {
avg_reply_time: 'reply_time',
};
export function useHiddenMetrics() {
const store = useStore();
const { currentAccount } = useAccount();
const hiddenMetrics = computed(() => {
return (
store.getters.getCurrentAccount?.settings?.report_hidden_metrics || []
);
return currentAccount.value?.settings?.report_hidden_metrics || [];
});
const isMetricHidden = metricKey => {