fix(ui): fix dashboard add button
This commit is contained in:
parent
b3765fe6c2
commit
86d4ad900c
1 changed files with 5 additions and 5 deletions
|
|
@ -8,7 +8,7 @@ import AddPredefinedMetric from './AddPredefinedMetric';
|
|||
import cn from 'classnames';
|
||||
|
||||
interface AddMetricButtonProps {
|
||||
iconName: string;
|
||||
iconName: "bar-pencil" | "grid-check";
|
||||
title: string;
|
||||
description: string;
|
||||
isPremade?: boolean;
|
||||
|
|
@ -49,8 +49,8 @@ function AddMetricButton({ iconName, title, description, onClick, isPremade, isP
|
|||
|
||||
interface Props {
|
||||
siteId: string
|
||||
isPopup: boolean
|
||||
onAction: () => void
|
||||
isPopup?: boolean
|
||||
onAction?: () => void
|
||||
}
|
||||
|
||||
function AddMetricContainer({ siteId, isPopup, onAction }: Props) {
|
||||
|
|
@ -58,7 +58,7 @@ function AddMetricContainer({ siteId, isPopup, onAction }: Props) {
|
|||
const { dashboardStore } = useStore();
|
||||
|
||||
const onAddCustomMetrics = () => {
|
||||
onAction()
|
||||
onAction?.()
|
||||
dashboardStore.initDashboard(dashboardStore.selectedDashboard);
|
||||
showModal(
|
||||
<AddMetric
|
||||
|
|
@ -71,7 +71,7 @@ function AddMetricContainer({ siteId, isPopup, onAction }: Props) {
|
|||
};
|
||||
|
||||
const onAddPredefinedMetrics = () => {
|
||||
onAction()
|
||||
onAction?.()
|
||||
dashboardStore.initDashboard(dashboardStore.selectedDashboard);
|
||||
showModal(
|
||||
<AddPredefinedMetric
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue