remove commented out code

pull/5370/head
Joseph Izang 3 years ago
parent cecbb24cc3
commit 8e1d939325
  1. 18
      libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx

@ -24,10 +24,6 @@ export function RemixUiVerticalIconsPanel ({
}: RemixUiVerticalIconsPanelProps) { }: RemixUiVerticalIconsPanelProps) {
const scrollableRef = useRef<any>() const scrollableRef = useRef<any>()
const iconPanelRef = useRef<any>() const iconPanelRef = useRef<any>()
// @ts-ignore
// scrollHeight = scrollableRef.current!.scrollHeight
// // @ts-ignore
// clientHeight = scrollableRef.current!.clientHeight
function onThemeChanged (themeType: any) { function onThemeChanged (themeType: any) {
const invert = themeType === 'dark' ? 1 : 0 const invert = themeType === 'dark' ? 1 : 0
@ -77,10 +73,6 @@ export function RemixUiVerticalIconsPanel ({
verticalIconsPlugin.renderComponent() verticalIconsPlugin.renderComponent()
} }
useEffect(() => {
console.log('usefRef for scrolling', scrollableRef)
})
useEffect(() => { useEffect(() => {
const themeModule = verticalIconsPlugin.registry.get('themeModule').api const themeModule = verticalIconsPlugin.registry.get('themeModule').api
themeModule.events.on('themeChanged', (theme: any) => { themeModule.events.on('themeChanged', (theme: any) => {
@ -88,14 +80,6 @@ export function RemixUiVerticalIconsPanel ({
}) })
}, []) }, [])
useEffect(() => {
// @ts-ignore
scrollHeight = scrollableRef.current.scrollHeight
// @ts-ignore
clientHeight = scrollableRef.current.clientHeight
console.log('scrollHeight ', scrollHeight)
}, [])
useEffect(() => { useEffect(() => {
const themeModule = verticalIconsPlugin.registry.get('themeModule').api const themeModule = verticalIconsPlugin.registry.get('themeModule').api
themeModule.events.on('themeChanged', (theme: any) => { themeModule.events.on('themeChanged', (theme: any) => {
@ -329,7 +313,7 @@ export function RemixUiVerticalIconsPanel ({
))} ))}
</OtherIcons> </OtherIcons>
</div> </div>
{scrollableRef.current && scrollableRef.current!.scrollHeight > clientHeight {scrollableRef.current && scrollableRef.current!.scrollHeight > scrollableRef.current!.clientHeight
? <i className="fa fa-chevron-double-down remixui_icon-chevron m-3"></i> ? <i className="fa fa-chevron-double-down remixui_icon-chevron m-3"></i>
: null : null
} }

Loading…
Cancel
Save