@akinon/pz-basket-gift-pack 1.89.0-rc.10 → 1.89.0-rc.11
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.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/index.tsx +10 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -60,6 +60,7 @@ export const BasketGiftPack = ({
|
|
|
60
60
|
charactersLength: 'characters left',
|
|
61
61
|
removeNote: 'Remove Note',
|
|
62
62
|
save: 'SAVE',
|
|
63
|
+
saving: 'SAVING...',
|
|
63
64
|
close: 'Close'
|
|
64
65
|
};
|
|
65
66
|
|
|
@@ -68,7 +69,8 @@ export const BasketGiftPack = ({
|
|
|
68
69
|
...translations
|
|
69
70
|
};
|
|
70
71
|
|
|
71
|
-
const [addGiftPackage] =
|
|
72
|
+
const [addGiftPackage, { isLoading: isAddingGiftPackage }] =
|
|
73
|
+
useAddGiftPackageMutation();
|
|
72
74
|
const [removeGiftPackage] = useRemoveGiftPackageMutation();
|
|
73
75
|
const [hasGiftPack, setHasGiftPack] = useState(false);
|
|
74
76
|
const [hasNote, setHasNote] = useState({
|
|
@@ -190,8 +192,14 @@ export const BasketGiftPack = ({
|
|
|
190
192
|
type="submit"
|
|
191
193
|
className="w-28 h-7 font-medium uppercase"
|
|
192
194
|
data-testid="basket-gift-pack-note-save-button"
|
|
195
|
+
disabled={
|
|
196
|
+
isAddingGiftPackage ||
|
|
197
|
+
textAreaCount === 0 ||
|
|
198
|
+
note.trim() === '' ||
|
|
199
|
+
note === defaultMessage
|
|
200
|
+
}
|
|
193
201
|
>
|
|
194
|
-
{_translations.save}
|
|
202
|
+
{isAddingGiftPackage ? _translations.saving : _translations.save}
|
|
195
203
|
</Button>
|
|
196
204
|
</div>
|
|
197
205
|
</div>
|