mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-22 22:30:52 +01:00
Roll back local storage cards, fix catalog.headers
This commit is contained in:
parent
0e44858e1d
commit
e9d9fd4253
@ -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<NitroCardViewProps> = props =>
|
||||
return newClassNames;
|
||||
}, [ theme, classNames ]);
|
||||
|
||||
useEffect(() =>
|
||||
/* useEffect(() =>
|
||||
{
|
||||
if(!uniqueKey || !elementRef || !elementRef.current) return;
|
||||
|
||||
@ -34,8 +33,8 @@ export const NitroCardView: FC<NitroCardViewProps> = 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<NitroCardViewProps> = props =>
|
||||
{
|
||||
observer.disconnect();
|
||||
}
|
||||
}, [ uniqueKey ]);
|
||||
}, [ uniqueKey ]); */
|
||||
|
||||
return (
|
||||
<NitroCardContextProvider value={ { theme } }>
|
||||
|
@ -69,7 +69,7 @@ export const CatalogView: FC<{}> = props =>
|
||||
return (
|
||||
<>
|
||||
{ isVisible &&
|
||||
<NitroCardView uniqueKey="catalog" className="nitro-catalog" style={ { width: GetConfiguration('catalog.headers') ? '710px' : '' } }>
|
||||
<NitroCardView uniqueKey="catalog" className="nitro-catalog" style={ GetConfiguration('catalog.headers') ? { width: 710 } : {} }>
|
||||
<NitroCardHeaderView headerText={ LocalizeText('catalog.title') } onCloseClick={ event => setIsVisible(false) } />
|
||||
<NitroCardTabsView>
|
||||
{ rootNode && (rootNode.children.length > 0) && rootNode.children.map(child =>
|
||||
|
Loading…
Reference in New Issue
Block a user