From 8e856e90408358814f7b5142c7088f1626967c40 Mon Sep 17 00:00:00 2001 From: Delirium Date: Mon, 23 Dec 2024 10:00:15 +0100 Subject: [PATCH] Live se red s2 (#2902) * Various improvements Cards, OmniSearch and Cards Listing * Improved cards listing page * Various improvements in product analytics * Charts UI improvements * ui crash --------- Co-authored-by: Sudheer Salavadi --- .../MetricViewHeader/MetricViewHeader.tsx | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/frontend/app/components/Dashboard/components/MetricViewHeader/MetricViewHeader.tsx b/frontend/app/components/Dashboard/components/MetricViewHeader/MetricViewHeader.tsx index c62cb4bda..53c9b833c 100644 --- a/frontend/app/components/Dashboard/components/MetricViewHeader/MetricViewHeader.tsx +++ b/frontend/app/components/Dashboard/components/MetricViewHeader/MetricViewHeader.tsx @@ -1,23 +1,19 @@ import React, { useEffect } from 'react'; import { PageTitle } from 'UI'; -import { Button, Popover } from 'antd'; -import { PlusOutlined } from '@ant-design/icons'; -import React, { useState } from 'react'; -import { PageTitle, Icon } from 'UI'; -import { Segmented, Button, Popover, Space, Dropdown, Menu } from 'antd'; +import { Button, Popover, Space, Dropdown, Menu } from 'antd'; import { PlusOutlined, DownOutlined } from '@ant-design/icons'; import AddCardSection from '../AddCardSection/AddCardSection'; import MetricsSearch from '../MetricsSearch'; import { useStore } from 'App/mstore'; import { observer } from 'mobx-react-lite'; +import { DROPDOWN_OPTIONS } from 'App/constants/card'; function MetricViewHeader() { const { metricStore } = useStore(); const filter = metricStore.filter; - const [showAddCardModal, setShowAddCardModal] = useState(false); useEffect(() => { - // Set the default sort order to 'desc' + // Set the default sort order to 'desc' metricStore.updateKey('sort', { by: 'desc' }); }, [metricStore]); // Handler for dropdown menu selection @@ -41,9 +37,12 @@ function MetricViewHeader() {
- - @@ -59,19 +58,15 @@ function MetricViewHeader() { -
- - - );