Skip to content

armgit / ente

Public Imported from GitHub
0

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

tsc

Manav Rathic8205b847590
diff --git a/web/packages/shared/components/EnteButton.tsx b/web/packages/shared/components/EnteButton.tsx
index ea0a936604..365d648a3c 100644
--- a/web/packages/shared/components/EnteButton.tsx
+++ b/web/packages/shared/components/EnteButton.tsx
@@ -1,3 +1,4 @@
+import { ensure } from "@/utils/ensure";
import Done from "@mui/icons-material/Done";
import { Button, CircularProgress, type ButtonProps } from "@mui/material";
@@ -21,8 +22,10 @@ export default function EnteButton({
...sx,
...((loading || success) && {
"&.Mui-disabled": (theme) => ({
- backgroundColor: theme.palette[props.color].main,
- color: theme.palette[props.color].contrastText,
+ // TODO: Refactor to not need this ensure.
+ backgroundColor:
+ theme.palette[ensure(props.color)].main,
+ color: theme.palette[ensure(props.color)].contrastText,
}),
}),
}}