Skip to content

armgit / ente

Public Imported from GitHub
0

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

Prune (secondary prop was set but was not being used)

Manav Rathi4b38164c58b5
diff --git a/web/apps/photos/src/components/DeleteAccountModal.tsx b/web/apps/photos/src/components/DeleteAccountModal.tsx
index e30180e8d6..fa4e6d5ae7 100644
--- a/web/apps/photos/src/components/DeleteAccountModal.tsx
+++ b/web/apps/photos/src/components/DeleteAccountModal.tsx
@@ -145,10 +145,6 @@ const DeleteAccountModal = ({ open, onClose }: Iprops) => {
fullScreen={isMobile}
attributes={{
title: t("delete_account"),
- secondary: {
- action: onClose,
- text: t("cancel"),
- },
}}
>
<Formik<FormValues>
diff --git a/web/packages/base/components/MiniDialog.tsx b/web/packages/base/components/MiniDialog.tsx
index e3f710d584..59e285299c 100644
--- a/web/packages/base/components/MiniDialog.tsx
+++ b/web/packages/base/components/MiniDialog.tsx
@@ -76,12 +76,6 @@ export interface MiniDialogAttributes {
variant?: ButtonProps["color"];
disabled?: boolean;
};
- secondary?: {
- text: string;
- action: () => void;
- variant?: ButtonProps["color"];
- disabled?: boolean;
- };
buttonDirection?: "row" | "column";
}
@@ -239,7 +233,6 @@ export interface DialogBoxV2Attributes {
title?: React.ReactNode;
staticBackdrop?: boolean;
nonClosable?: boolean;
-
/**
* Customize the cancel (dismiss) action button offered by the dialog box.
*
@@ -258,30 +251,6 @@ export interface DialogBoxV2Attributes {
*/
action?: () => void;
};
- /**
- * Customize the primary action button offered by the dialog box.
- */
- proceed?: {
- /** The string to use as the label for the primary action. */
- text: string;
- /**
- * The function to call when the user presses the primary action button.
- *
- * It is passed a {@link setLoading} function that can be used to show
- * or hide loading indicator or the primary action button.
- */
- action:
- | (() => void | Promise<void>)
- | ((setLoading: (value: boolean) => void) => void | Promise<void>);
- variant?: ButtonProps["color"];
- disabled?: boolean;
- };
- secondary?: {
- text: string;
- action: () => void;
- variant?: ButtonProps["color"];
- disabled?: boolean;
- };
buttonDirection?: "row" | "column";
}
@@ -306,7 +275,6 @@ export function DialogBoxV2({
onClose,
...props
}: DialogBoxV2Props) {
- const [loading, setLoading] = useState(false);
if (!attributes) {
return <></>;
}
@@ -342,7 +310,7 @@ export function DialogBoxV2({
)}
{children}
</Stack>
- {(attributes.proceed || attributes.close) && (
+ {attributes.close && (
<Stack
spacing={"8px"}
direction={
@@ -352,23 +320,6 @@ export function DialogBoxV2({
}
flex={1}
>
- {attributes.proceed && (
- <LoadingButton
- loading={loading}
- size="large"
- color={attributes.proceed?.variant}
- onClick={async () => {
- await attributes.proceed?.action(
- setLoading,
- );
-
- onClose();
- }}
- disabled={attributes.proceed.disabled}
- >
- {attributes.proceed.text}
- </LoadingButton>
- )}
{attributes.close && (
<FocusVisibleButton
size="large"