From 044511bc1b8e2278132af8ccb22265ef4d27c4e5 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 25 Aug 2021 09:28:20 +0200 Subject: [PATCH] rm comments --- .../src/lib/components/rootView.tsx | 1 - .../src/lib/custom-hooks/useLocalStorage.ts | 37 ------------------- .../src/lib/remix-ui-plugin-manager.tsx | 1 - 3 files changed, 39 deletions(-) diff --git a/libs/remix-ui/plugin-manager/src/lib/components/rootView.tsx b/libs/remix-ui/plugin-manager/src/lib/components/rootView.tsx index 567ea64f8c..c889aad285 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/rootView.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/rootView.tsx @@ -33,7 +33,6 @@ function RootView ({ pluginComponent, pluginManagerSettings, children }: RootVie useEffect(() => { pluginComponent.getAndFilterPlugins(filterPlugins) }, [filterPlugins]) - // console.log('This is the state of pluginSettings instance passed from pluginmanager', pluginComponent.pluginSettings) return (
diff --git a/libs/remix-ui/plugin-manager/src/lib/custom-hooks/useLocalStorage.ts b/libs/remix-ui/plugin-manager/src/lib/custom-hooks/useLocalStorage.ts index 80e3ea3a4d..d4a90aa657 100644 --- a/libs/remix-ui/plugin-manager/src/lib/custom-hooks/useLocalStorage.ts +++ b/libs/remix-ui/plugin-manager/src/lib/custom-hooks/useLocalStorage.ts @@ -1,40 +1,3 @@ -// import { useState } from 'react' - -// // Hook -// export const useLocalStorage = (key: string, initialValue: any) => { -// // State to store our value -// // Pass initial state function to useState so logic is only executed once -// const [storedValue, setStoredValue] = useState(() => { -// try { -// // Get from local storage by key -// const item = window.localStorage.getItem(key) -// // Parse stored json or if none return initialValue -// return item ? JSON.parse(item) : initialValue -// } catch (error) { -// // If error also return initialValue -// console.log(error) -// return initialValue -// } -// }) -// // Return a wrapped version of useState's setter function that ... -// // ... persists the new value to localStorage. -// const setValue = (value: any | ((val: any) => any)) => { -// try { -// // Allow value to be a function so we have same API as useState -// const valueToStore = -// value instanceof Function ? value(storedValue) : value -// // Save state -// setStoredValue(valueToStore) -// // Save to local storage -// window.localStorage.setItem(key, JSON.stringify(valueToStore)) -// } catch (error) { -// // A more advanced implementation would handle the error case -// console.log(error) -// } -// } -// return [storedValue, setValue] as const -// } - import { Dispatch, SetStateAction, useEffect, useState } from 'react' type SetValue = Dispatch> diff --git a/libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx b/libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx index 1af73faf85..56d042685c 100644 --- a/libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx @@ -10,7 +10,6 @@ import './remix-ui-plugin-manager.css' export const RemixUiPluginManager = ({ pluginComponent, pluginManagerSettings }: RemixUiPluginManagerProps) => { const [activeProfiles, setActiveProfiles] = useState(pluginComponent.activePlugins) const [inactiveProfiles, setinactiveProfiles] = useState(pluginComponent.inactivePlugins) - // console.log('This is the state of pluginSettings at the root of the components', pluginComponent.pluginSettings) return (