Skip to content

armgit / ente

Public Imported from GitHub
0

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

Simplify

Manav Rathif3f7d67fb388
diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx
index f821cfe790..2aa97a6d44 100644
--- a/web/apps/photos/src/pages/gallery.tsx
+++ b/web/apps/photos/src/pages/gallery.tsx
@@ -2,6 +2,7 @@ import { sessionExpiredDialogAttributes } from "@/accounts/components/utils/dial
import { stashRedirect } from "@/accounts/services/redirect";
import type { MiniDialogAttributes } from "@/base/components/MiniDialog";
import { AppNavbar, NavbarBase } from "@/base/components/Navbar";
+import type { ButtonishProps } from "@/base/components/mui";
import { ActivityIndicator } from "@/base/components/mui/ActivityIndicator";
import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
import { errorDialogAttributes } from "@/base/components/utils/dialog";
@@ -85,7 +86,6 @@ import {
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
import FileUploadOutlinedIcon from "@mui/icons-material/FileUploadOutlined";
import MenuIcon from "@mui/icons-material/Menu";
-import type { ButtonProps, IconButtonProps } from "@mui/material";
import { Box, IconButton, Stack, Typography } from "@mui/material";
import AuthenticateUserModal from "components/AuthenticateUserModal";
import CollectionNamer, {
@@ -1181,13 +1181,13 @@ const NormalNavbarContents: React.FC<NormalNavbarContentsProps> = ({
</>
);
-const SidebarButton: React.FC<IconButtonProps> = (props) => (
- <IconButton {...props}>
+const SidebarButton: React.FC<ButtonishProps> = ({ onClick }) => (
+ <IconButton {...{ onClick }}>
<MenuIcon />
</IconButton>
);
-const UploadButton: React.FC<ButtonProps & IconButtonProps> = (props) => {
+const UploadButton: React.FC<ButtonishProps> = ({ onClick }) => {
const disabled = !uploadManager.shouldAllowNewUpload();
const isSmallWidth = useIsSmallWidth();
@@ -1196,15 +1196,12 @@ const UploadButton: React.FC<ButtonProps & IconButtonProps> = (props) => {
return (
<Box>
{isSmallWidth ? (
- <IconButton {...props} disabled={disabled}>
- {icon}
- </IconButton>
+ <IconButton {...{ onClick, disabled }}>{icon}</IconButton>
) : (
<FocusVisibleButton
- {...props}
- disabled={disabled}
- color={"secondary"}
+ color="secondary"
startIcon={icon}
+ {...{ onClick, disabled }}
>
{t("upload")}
</FocusVisibleButton>