@homefile/components-v2 2.7.20 → 2.7.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,5 +21,5 @@ export const HomeCardWithRecipent = ({ address: { city, state, street, number =
21
21
  component: (_jsx(HomeCardRecipients, { recipients: recipients, menu: menu, onEditClick: handleEditAccountType })),
22
22
  }
23
23
  ];
24
- return (_jsxs(Container, { variant: "launchpad", children: [_jsx(HomeCard, { city: city, externalLink: externalLink, imageUrl: image, name: name, number: number, street: street, state: state, zip: zip, handleEditClick: () => handleEdit(_id), addImage: addImage, loading: loading, edit: !disabled }), _jsx(TabsHeader, { tabList: propertyDisabled ? noPropertyTabs : tabs }), _jsx(RightPanel, { isOpen: isRightOpen, onClose: onRightClose, size: panelSize, children: _jsx(EditAccountType, { associateAccount: editingAccountType, handleClose: onRightClose, handleDelete: handleDeleteAccountType, handleSubmit: handleSubmitAccountType, isLoading: loading }) })] }));
24
+ return (_jsxs(Container, { variant: "launchpad", children: [_jsx(HomeCard, { city: city, externalLink: externalLink, imageUrl: image, name: name, number: number, street: street, state: state, zip: zip, handleEditClick: () => handleEdit(_id), addImage: addImage, loading: loading, edit: !disabled }), _jsx(TabsHeader, { tabList: propertyDisabled ? noPropertyTabs : tabs }), (handleDeleteAccountType && handleSubmitAccountType) && (_jsx(RightPanel, { isOpen: isRightOpen, onClose: onRightClose, size: panelSize, children: _jsx(EditAccountType, { associateAccount: editingAccountType, handleClose: onRightClose, handleDelete: handleDeleteAccountType, handleSubmit: handleSubmitAccountType, isLoading: loading }) }))] }));
25
25
  };
@@ -17,8 +17,8 @@ export interface HomeCardWithRecipentI {
17
17
  externalLink?: string;
18
18
  _id: string;
19
19
  handleEdit: (id: string) => void;
20
- handleDeleteAccountType: (email: string) => void;
21
- handleSubmitAccountType: (form: AssociatedAccountI) => void;
20
+ handleDeleteAccountType?: (email: string) => void;
21
+ handleSubmitAccountType?: (form: AssociatedAccountI) => void;
22
22
  image?: ImageI | null;
23
23
  loading?: boolean;
24
24
  menu?: MenuItemI[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.7.20",
3
+ "version": "2.7.21",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",
@@ -92,16 +92,19 @@ export const HomeCardWithRecipent = ({
92
92
  />
93
93
 
94
94
  <TabsHeader tabList={propertyDisabled ? noPropertyTabs : tabs} />
95
-
96
- <RightPanel isOpen={isRightOpen} onClose={onRightClose} size={panelSize}>
97
- <EditAccountType
98
- associateAccount={editingAccountType}
99
- handleClose={onRightClose}
100
- handleDelete={handleDeleteAccountType}
101
- handleSubmit={handleSubmitAccountType}
102
- isLoading={loading}
103
- />
104
- </RightPanel>
95
+ {
96
+ (handleDeleteAccountType && handleSubmitAccountType) && (
97
+ <RightPanel isOpen={isRightOpen} onClose={onRightClose} size={panelSize}>
98
+ <EditAccountType
99
+ associateAccount={editingAccountType}
100
+ handleClose={onRightClose}
101
+ handleDelete={handleDeleteAccountType}
102
+ handleSubmit={handleSubmitAccountType}
103
+ isLoading={loading}
104
+ />
105
+ </RightPanel>
106
+ )
107
+ }
105
108
  </Container>
106
109
  )
107
110
  }
@@ -24,8 +24,8 @@ export interface HomeCardWithRecipentI {
24
24
  externalLink?: string
25
25
  _id: string
26
26
  handleEdit: (id: string) => void
27
- handleDeleteAccountType: (email: string) => void
28
- handleSubmitAccountType: (form: AssociatedAccountI) => void
27
+ handleDeleteAccountType?: (email: string) => void
28
+ handleSubmitAccountType?: (form: AssociatedAccountI) => void
29
29
  image?: ImageI | null
30
30
  loading?: boolean
31
31
  menu?: MenuItemI[]