From b45e270475dbfdf4cf1d438150d32278c66c296d Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Wed, 28 May 2025 12:24:03 +0530 Subject: [PATCH] Unused --- .../Collections/CollectionShare.tsx | 71 ++----------------- 1 file changed, 5 insertions(+), 66 deletions(-) diff --git a/web/apps/photos/src/components/Collections/CollectionShare.tsx b/web/apps/photos/src/components/Collections/CollectionShare.tsx index 30320038db..9e10a15d19 100644 --- a/web/apps/photos/src/components/Collections/CollectionShare.tsx +++ b/web/apps/photos/src/components/Collections/CollectionShare.tsx @@ -12,18 +12,10 @@ import Photo, { default as PhotoIcon } from "@mui/icons-material/Photo"; import PublicIcon from "@mui/icons-material/Public"; import RemoveCircleOutlineIcon from "@mui/icons-material/RemoveCircleOutline"; import WorkspacesIcon from "@mui/icons-material/Workspaces"; -import { - Dialog, - DialogProps, - FormHelperText, - Stack, - styled, - Typography, -} from "@mui/material"; +import { Dialog, DialogProps, Stack, styled, Typography } from "@mui/material"; import NumberAvatar from "@mui/material/Avatar"; import TextField from "@mui/material/TextField"; import Avatar from "components/pages/gallery/Avatar"; -import { FocusVisibleButton } from "ente-base/components/mui/FocusVisibleButton"; import { LoadingButton } from "ente-base/components/mui/LoadingButton"; import { NestedSidebarDrawer, @@ -556,7 +548,6 @@ const AddParticipant: React.FC = ({ ? t("add_viewers") : t("add_collaborators") } - submitButtonProps={{ size: "large", sx: { mt: 1, mb: 2 } }} disableAutoFocus /> @@ -574,24 +565,12 @@ interface AddParticipantFormProps { fieldType: "text" | "email" | "password"; placeholder: string; buttonText: string; - submitButtonProps?: any; - initialValue?: string; - secondaryButtonAction?: () => void; disableAutoFocus?: boolean; - hiddenPreInput?: any; - caption?: any; - hiddenPostInput?: any; - autoComplete?: string; - blockButton?: boolean; - hiddenLabel?: boolean; onClose?: () => void; optionsList?: string[]; } const AddParticipantForm: React.FC = (props) => { - const { submitButtonProps } = props; - const { sx: buttonSx, ...restSubmitButtonProps } = submitButtonProps ?? {}; - const [loading, SetLoading] = useState(false); const submitForm = async ( @@ -633,10 +612,7 @@ const AddParticipantForm: React.FC = (props) => { return ( - initialValues={{ - inputValue: props.initialValue ?? "", - selectedOptions: [], - }} + initialValues={{ inputValue: "", selectedOptions: [] }} onSubmit={submitForm} validationSchema={validationSchema} validateOnChange={false} @@ -651,14 +627,12 @@ const AddParticipantForm: React.FC = (props) => { }) => (
- {props.hiddenPreInput} {t("add_new_email")} = (props) => { handleInputFieldClick(setFieldValue) } name={props.fieldType} - {...(props.hiddenLabel - ? { placeholder: props.placeholder } - : { label: props.placeholder })} + label={props.placeholder} error={Boolean(errors.inputValue)} helperText={errors.inputValue} value={values.inputValue} disabled={loading} autoFocus={!props.disableAutoFocus} - autoComplete={props.autoComplete} /> @@ -735,51 +706,19 @@ const AddParticipantForm: React.FC = (props) => { )} - - - {props.caption} - - {props.hiddenPostInput} - {props.secondaryButtonAction && ( - - {t("cancel")} - - )} - {props.buttonText}