From e9d9fd42539d82691c0d603ffd9252e9d3365c04 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 23 Aug 2022 23:15:14 -0400 Subject: [PATCH] Roll back local storage cards, fix catalog.headers --- src/common/card/NitroCardView.tsx | 11 +++++------ src/components/catalog/CatalogView.tsx | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/common/card/NitroCardView.tsx b/src/common/card/NitroCardView.tsx index 236f615f..46c4126b 100644 --- a/src/common/card/NitroCardView.tsx +++ b/src/common/card/NitroCardView.tsx @@ -1,6 +1,5 @@ -import { FC, useEffect, useMemo, useRef } from 'react'; +import { FC, useMemo, useRef } from 'react'; import { Column, ColumnProps } from '..'; -import { GetLocalStorage, SetLocalStorage, WindowSaveOptions } from '../../api'; import { DraggableWindow, DraggableWindowPosition, DraggableWindowProps } from '../draggable-window'; import { NitroCardContextProvider } from './NitroCardContext'; @@ -25,7 +24,7 @@ export const NitroCardView: FC = props => return newClassNames; }, [ theme, classNames ]); - useEffect(() => + /* useEffect(() => { if(!uniqueKey || !elementRef || !elementRef.current) return; @@ -34,8 +33,8 @@ export const NitroCardView: FC = props => if(localStorage && localStorage.size) { - element.style.width = `${ localStorage.size.width }px`; - element.style.height = `${ localStorage.size.height }px`; + //element.style.width = `${ localStorage.size.width }px`; + //element.style.height = `${ localStorage.size.height }px`; } const observer = new ResizeObserver(event => @@ -53,7 +52,7 @@ export const NitroCardView: FC = props => { observer.disconnect(); } - }, [ uniqueKey ]); + }, [ uniqueKey ]); */ return ( diff --git a/src/components/catalog/CatalogView.tsx b/src/components/catalog/CatalogView.tsx index f15fe8d2..6201c33a 100644 --- a/src/components/catalog/CatalogView.tsx +++ b/src/components/catalog/CatalogView.tsx @@ -69,7 +69,7 @@ export const CatalogView: FC<{}> = props => return ( <> { isVisible && - + setIsVisible(false) } /> { rootNode && (rootNode.children.length > 0) && rootNode.children.map(child =>