From a6aecea76c95b61f543c63416674d64e21aa3779 Mon Sep 17 00:00:00 2001 From: Stan Girard Date: Sun, 2 Jul 2023 18:59:15 +0200 Subject: [PATCH] chore(telemetry): added for DELETE_BRAIN (#457) --- .../components/NavItems/components/BrainsDropDown.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/lib/components/NavBar/components/NavItems/components/BrainsDropDown.tsx b/frontend/lib/components/NavBar/components/NavItems/components/BrainsDropDown.tsx index 9df2dfdcb9e3..42115070afd4 100644 --- a/frontend/lib/components/NavBar/components/NavItems/components/BrainsDropDown.tsx +++ b/frontend/lib/components/NavBar/components/NavItems/components/BrainsDropDown.tsx @@ -1,12 +1,13 @@ /* eslint-disable */ import { useEffect, useRef, useState } from "react"; import { FaBrain } from "react-icons/fa"; -import { IoMdAdd, IoMdTrash } from "react-icons/io"; +import { IoMdAdd } from "react-icons/io"; import Button from "@/lib/components/ui/Button"; import Field from "@/lib/components/ui/Field"; import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext"; import { useEventTracking } from "@/services/analytics/useEventTracking"; +import { UUID } from "crypto"; import { AnimatePresence, motion } from "framer-motion"; import { MdCheck, MdDelete } from "react-icons/md"; @@ -47,6 +48,11 @@ export const BrainsDropDown = (): JSX.Element => { setNewBrainName(value); }; + const deteleBrains = (id: UUID) => { + void track("DELETE_BRAIN"); + deleteBrain(id); + }; + useEffect(() => { document.addEventListener("mousedown", handleClickOutside); @@ -123,7 +129,7 @@ export const BrainsDropDown = (): JSX.Element => {