Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Sym

Manav Rathiffe290d56dc2
diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx
index 37ad4a78f4..40cbe786c5 100644
--- a/web/apps/photos/src/pages/gallery.tsx
+++ b/web/apps/photos/src/pages/gallery.tsx
@@ -1085,9 +1085,9 @@ export default function Gallery() {
) : (
<NormalNavbarContents
openSidebar={openSidebar}
- setIsInSearchMode={setIsInSearchMode}
openUploader={openUploader}
isInSearchMode={isInSearchMode}
+ setIsInSearchMode={setIsInSearchMode}
collections={collections}
files={files}
updateSearch={updateSearch}
@@ -1277,33 +1277,31 @@ const NormalNavbarContents: React.FC<NormalNavbarContentsProps> = ({
openSidebar,
openUploader,
isInSearchMode,
+ setIsInSearchMode,
collections,
files,
updateSearch,
- setIsInSearchMode,
-}) => {
- return (
- <>
- {!isInSearchMode && (
- <IconButton onClick={openSidebar}>
- <MenuIcon />
- </IconButton>
- )}
- <SearchBar
- isInSearchMode={isInSearchMode}
- setIsInSearchMode={setIsInSearchMode}
- collections={collections}
- files={files}
- updateSearch={updateSearch}
- />
- {!isInSearchMode && <UploadButton onClick={openUploader} />}
- </>
- );
-};
+}) => (
+ <>
+ {!isInSearchMode && <SidebarButton onClick={openSidebar} />}
+ <SearchBar
+ isInSearchMode={isInSearchMode}
+ setIsInSearchMode={setIsInSearchMode}
+ collections={collections}
+ files={files}
+ updateSearch={updateSearch}
+ />
+ {!isInSearchMode && <UploadButton onClick={openUploader} />}
+ </>
+);
+
+const SidebarButton: React.FC<IconButtonProps> = (props) => (
+ <IconButton {...props}>
+ <MenuIcon />
+ </IconButton>
+);
-export const UploadButton: React.FC<ButtonProps & IconButtonProps> = (
- props,
-) => {
+const UploadButton: React.FC<ButtonProps & IconButtonProps> = (props) => {
const disabled = !uploadManager.shouldAllowNewUpload();
const isMobileWidth = useIsMobileWidth();