Corrections
This commit is contained in:
parent
78faf2fae0
commit
511f46c879
|
@ -20,9 +20,9 @@ export default function EmailShare({ collection }) {
|
|||
useEffect(() => {
|
||||
const getUpdatedOptionsList = async () => {
|
||||
const ownerUser: User = getData(LS_KEYS.USER);
|
||||
const collection_list = getLocalCollections();
|
||||
const family_list = getLocalFamilyData();
|
||||
const result = await collection_list;
|
||||
const collectionList = getLocalCollections();
|
||||
const familyList = getLocalFamilyData();
|
||||
const result = await collectionList;
|
||||
const emails = result.flatMap((item) => {
|
||||
const shareeEmails = item.sharees.map((sharee) => sharee.email);
|
||||
if (item.owner.email) {
|
||||
|
@ -33,10 +33,8 @@ export default function EmailShare({ collection }) {
|
|||
});
|
||||
|
||||
// adding family members
|
||||
if (family_list) {
|
||||
const family = family_list.members.map(
|
||||
(member) => member.email
|
||||
);
|
||||
if (familyList) {
|
||||
const family = familyList.members.map((member) => member.email);
|
||||
emails.push(...family);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,8 +34,6 @@ export interface SingleInputFormProps {
|
|||
}
|
||||
|
||||
export default function SingleInputForm(props: SingleInputFormProps) {
|
||||
const [selectedOptions, setSelectedOptions] = useState([]);
|
||||
|
||||
const { submitButtonProps } = props;
|
||||
const { sx: buttonSx, ...restSubmitButtonProps } = submitButtonProps ?? {};
|
||||
|
||||
|
@ -53,10 +51,6 @@ export default function SingleInputForm(props: SingleInputFormProps) {
|
|||
resetForm
|
||||
);
|
||||
|
||||
if (props.optionsList && props.optionsList.length > 0) {
|
||||
setSelectedOptions([...selectedOptions, values.inputValue]);
|
||||
}
|
||||
|
||||
SetLoading(false);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue