From d181cd9e3f70678aa4e23171225197d725459192 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Thu, 19 Dec 2019 15:43:49 -0500 Subject: [PATCH] cleanup --- package.json | 2 +- ui/component/fileViewer/view.jsx | 10 +- ui/component/fileViewerInitiator/view.jsx | 2 +- ui/component/sideNavigation/view.jsx | 20 ++-- ui/modal/modal.jsx | 104 +++++++++---------- ui/modal/modalMobileNavigation/view.jsx | 2 +- ui/scss/component/_claim-list.scss | 13 ++- ui/scss/component/_main.scss | 2 + ui/scss/component/_modal.scss | 5 + ui/scss/component/_placeholder.scss | 6 ++ yarn.lock | 115 ++-------------------- 11 files changed, 100 insertions(+), 181 deletions(-) diff --git a/package.json b/package.json index fa2a40606..e688c00d0 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "@babel/register": "^7.0.0", "@exponent/electron-cookies": "^2.0.0", "@hot-loader/react-dom": "^16.8", - "@lbry/components": "^3.0.3", + "@lbry/components": "^3.0.4", "@reach/menu-button": "^0.1.18", "@reach/rect": "^0.2.1", "@reach/tabs": "^0.1.5", diff --git a/ui/component/fileViewer/view.jsx b/ui/component/fileViewer/view.jsx index 3482beea5..eb0363ee9 100644 --- a/ui/component/fileViewer/view.jsx +++ b/ui/component/fileViewer/view.jsx @@ -105,15 +105,13 @@ export default function FileViewer(props: Props) { setFileViewerRect(rect); } - if (inline) { + return () => { handleResize(); window.addEventListener('resize', handleResize); onFullscreenChange(window, 'add', handleResize); - return () => { - window.removeEventListener('resize', handleResize); - onFullscreenChange(window, 'remove', handleResize); - }; - } + window.removeEventListener('resize', handleResize); + onFullscreenChange(window, 'remove', handleResize); + }; }, [setFileViewerRect, inline]); function handleDrag(e, ui) { diff --git a/ui/component/fileViewerInitiator/view.jsx b/ui/component/fileViewerInitiator/view.jsx index ecbea2f6f..48a9b32ce 100644 --- a/ui/component/fileViewerInitiator/view.jsx +++ b/ui/component/fileViewerInitiator/view.jsx @@ -103,7 +103,7 @@ export default function FileViewer(props: Props) { return (
void, }; @@ -27,7 +27,7 @@ function SideBar(props: Props) { doSignOut, email, sticky = true, - showAllLinks = false, + expanded = false, } = props; const isAuthenticated = Boolean(email); @@ -94,7 +94,7 @@ function SideBar(props: Props) { ))} - {showAllLinks && + {expanded && [ { ...buildLink(PAGES.WALLET, __('Wallet'), ICONS.WALLET), @@ -117,11 +117,15 @@ function SideBar(props: Props) { { ...(isAuthenticated ? { ...buildLink(PAGES.AUTH, __('Sign Out'), ICONS.SIGN_OUT, doSignOut) } : {}), }, - ].map(linkProps => ( -
  • -
  • - ))} + ].map( + linkProps => + Object.keys(linkProps).length > 0 && + (linkProps && ( +
  • +
  • + )) + )}
  • - )} - - ); - } + const isMobile = useIsMobile(); + + return ( + + {title &&

    {title}

    } + {type === 'card' && ( +