diff --git a/packages/files-ui/src/Components/Modules/FileBrowsers/ShareToSharedFolderModal.tsx b/packages/files-ui/src/Components/Modules/FileBrowsers/ShareToSharedFolderModal.tsx index bca7cb8ed1..5055e7b17f 100644 --- a/packages/files-ui/src/Components/Modules/FileBrowsers/ShareToSharedFolderModal.tsx +++ b/packages/files-ui/src/Components/Modules/FileBrowsers/ShareToSharedFolderModal.tsx @@ -387,94 +387,6 @@ const CopyToSharedFolderModal = ({ close, file, filePath }: IShareFileProps) => ), [classes.loadingContainer, isDownloading, isUploading]) - const Step1CreateSharedFolder = useCallback(() => ( - <> -
- - {nameError && ( - - {nameError} - - )} -
-
- onNewUsers(values, "read")} - label={t`Give view-only permission to:`} - labelClassName={classes.inputLabel} - value={sharedFolderReaders} - fetchTags={(inputVal) => handleLookupUser(inputVal, "read")} - placeholder={t`Add by sharing address, username or wallet address`} - styles={{ - control: (provided) => ({ - ...provided, - minHeight: 90, - alignContent: "start" - }) - }}/> -
-
- onNewUsers(values, "write")} - label={t`Give edit permission to:`} - labelClassName={classes.inputLabel} - value={sharedFolderWriters} - fetchTags={(inputVal) => handleLookupUser(inputVal, "write")} - placeholder={t`Add by sharing address, username or wallet address`} - styles={{ - control: (provided) => ({ - ...provided, - minHeight: 90, - alignContent: "start" - }) - }}/> -
- {!!usersError && ( - - {usersError} - - )} - - ), [ - classes, - handleLookupUser, - nameError, - onNameChange, - onNewUsers, - sharedFolderName, - sharedFolderReaders, - sharedFolderWriters, - usersError - ]) - - const Step1ExistingSharedFolder = useCallback(() => ( -
- setDestinationBucket(buckets.find((bu) => bu.id === val))} - /> -
- ), [buckets, bucketsOptions, classes.inputLabel, classes.inputWrapper, classes.modalFlexItem, destinationBucket]) - return (
{currentStep === "1_SHARED_FOLDER_SELECTION_CREATION" && ( isUsingCurrentBucket - ? - : + ? ( +
+ setDestinationBucket(buckets.find((bu) => bu.id === val))} + /> +
+ ) + : ( + <> +
+ + {nameError && ( + + {nameError} + + )} +
+
+ onNewUsers(values, "read")} + label={t`Give view-only permission to:`} + labelClassName={classes.inputLabel} + value={sharedFolderReaders} + fetchTags={(inputVal) => handleLookupUser(inputVal, "read")} + placeholder={t`Add by sharing address, username or wallet address`} + styles={{ + control: (provided) => ({ + ...provided, + minHeight: 90, + alignContent: "start" + }) + }}/> +
+
+ onNewUsers(values, "write")} + label={t`Give edit permission to:`} + labelClassName={classes.inputLabel} + value={sharedFolderWriters} + fetchTags={(inputVal) => handleLookupUser(inputVal, "write")} + placeholder={t`Add by sharing address, username or wallet address`} + styles={{ + control: (provided) => ({ + ...provided, + minHeight: 90, + alignContent: "start" + }) + }}/> +
+ {!!usersError && ( + + {usersError} + + )} + + ) )}
{currentStep === "1_SHARED_FOLDER_SELECTION_CREATION" && (