From 9296bf716eac73ebb6013d0d517da828673054a4 Mon Sep 17 00:00:00 2001 From: Tim Pechersky Date: Wed, 27 Oct 2021 15:03:44 +0200 Subject: [PATCH] cleanup --- frontend/src/components/NewDashboard.js | 16 +--------------- .../src/core/providers/OverlayProvider/index.js | 9 +-------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/frontend/src/components/NewDashboard.js b/frontend/src/components/NewDashboard.js index d09ab3ab..6d74a3f5 100644 --- a/frontend/src/components/NewDashboard.js +++ b/frontend/src/components/NewDashboard.js @@ -61,15 +61,12 @@ const NewDashboard = (props) => { subscriptions.subscriptionsCache.isLoading, ]); - // console.log("selectedItems", newDashboardForm.s); - const filterFn = (item, inputValue) => item.subscription_type_id === "ethereum_blockchain" && (!inputValue || item.address.toUpperCase().includes(inputValue.toUpperCase()) || item.label.toUpperCase().includes(inputValue.toUpperCase())); - console.log("ui.newDashBoardForm", newDashboardForm); return ( <> @@ -142,11 +139,9 @@ const NewDashboard = (props) => { // selectedItem, getRootProps, }) => { - console.log("subscibedItem:", subscibedItem); const labelColor = subscibedItem.color && color(`${subscibedItem.color}`); - console.log("inputValue:", inputValue); return ( { const badgeColor = color( `${item.color}` ); - // badgeColor.setbadgeColor.isDark() - // ? badgeColor.lighten(0.5) - // : badgeColor.darken(0.5); - // console.log( - // "original color", - // item.color, - // "modified:", - // badgeColor.hex() - // ); + return ( { ...newDashboardForm?.subscriptions, ]; hardcopy.splice(idx, 1); - console.log("index", idx, hardcopy); setNewDashboardForm((prevState) => { return { ...prevState, diff --git a/frontend/src/core/providers/OverlayProvider/index.js b/frontend/src/core/providers/OverlayProvider/index.js index 25645b44..e3684a07 100644 --- a/frontend/src/core/providers/OverlayProvider/index.js +++ b/frontend/src/core/providers/OverlayProvider/index.js @@ -49,16 +49,10 @@ const OverlayProvider = ({ children }) => { const modalDisclosure = useDisclosure(); const alertDisclosure = useDisclosure(); - // TODO @Peersky: This is written to take Disclosure state and modify modal state - // This should be written same as Drawer - Take modal state and modify Disclosure - // However to implement this - first SIGNUP,FORGOT,HUBSPOT components should be written to support this useLayoutEffect(() => { if (modal === MODAL_TYPES.OFF && modalDisclosure.isOpen) { - // toggleModal(MODAL_TYPES.NEW_SUBSCRIPTON); - console.log("thats unexpected"); modalDisclosure.onClose(); } else if (modal !== MODAL_TYPES.OFF && !modalDisclosure.isOpen) { - // toggleModal(MODAL_TYPES.OFF); modalDisclosure.onOpen(); } }, [modal, modalDisclosure]); @@ -81,11 +75,9 @@ const OverlayProvider = ({ children }) => { alertDisclosure.onOpen(); }; - console.log("drawer", drawer); console.assert( Object.values(DRAWER_TYPES).some((element) => element === drawer) ); - console.log("modal", modal); console.assert( Object.values(MODAL_TYPES).some((element) => element === modal) ); @@ -224,6 +216,7 @@ const OverlayProvider = ({ children }) => {