Skip to content

armgit / ente

Public Imported from GitHub
0

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

More

Manav Rathic4d6323a3660
diff --git a/web/packages/base/components/mui/LoadingButton.tsx b/web/packages/base/components/mui/LoadingButton.tsx
index 40ea874152..c002957cdb 100644
--- a/web/packages/base/components/mui/LoadingButton.tsx
+++ b/web/packages/base/components/mui/LoadingButton.tsx
@@ -1,4 +1,5 @@
import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
+import { isSxArray } from "@/base/components/utils/sx";
import { CircularProgress, type ButtonProps } from "@mui/material";
import React from "react";
@@ -20,13 +21,15 @@ export const LoadingButton: React.FC<ButtonProps & { loading?: boolean }> = ({
<FocusVisibleButton
{...{ color }}
disabled
- sx={{
- "&.Mui-disabled": {
- backgroundColor: `${color}.main`,
- color: `${color}.contrastText`,
+ sx={[
+ {
+ "&.Mui-disabled": {
+ backgroundColor: `${color}.main`,
+ color: `${color}.contrastText`,
+ },
},
- ...sx,
- }}
+ ...(sx ? (isSxArray(sx) ? sx : [sx]) : []),
+ ]}
{...rest}
>
<CircularProgress size={20} sx={{ color: "inherit" }} />
diff --git a/web/packages/base/components/utils/dialog.tsx b/web/packages/base/components/utils/dialog.tsx
index a8a4689db3..0232b6fba3 100644
--- a/web/packages/base/components/utils/dialog.tsx
+++ b/web/packages/base/components/utils/dialog.tsx
@@ -44,7 +44,7 @@ export const errorDialogAttributes = (
optionalMessage?: string,
): MiniDialogAttributes => {
const title = optionalMessage ? messageOrTitle : t("error");
- const message = optionalMessage ? optionalMessage : messageOrTitle;
+ const message = optionalMessage ?? messageOrTitle;
return {
title,
diff --git a/web/packages/shared/network/HTTPService.ts b/web/packages/shared/network/HTTPService.ts
index 474728de08..34ba36e6cd 100644
--- a/web/packages/shared/network/HTTPService.ts
+++ b/web/packages/shared/network/HTTPService.ts
@@ -134,6 +134,7 @@ class HTTPService {
public async request(config: AxiosRequestConfig, customConfig?: any) {
config.headers = {
...this.headers,
+ // eslint-disable-next-line @typescript-eslint/no-misused-spread
...config.headers,
};
if (customConfig?.cancel) {