@akinon/pz-multi-basket 1.44.0 → 1.45.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/views/MultiBasket.tsx +5 -5
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
@@ -4,7 +4,7 @@ import React, { useEffect, useState } from 'react';
|
|
4
4
|
import {
|
5
5
|
useGetBasketQuery,
|
6
6
|
useGetAllBasketsQuery,
|
7
|
-
|
7
|
+
useLazyGetBasketDetailQuery,
|
8
8
|
useRemoveBasketMutation,
|
9
9
|
useSelectMainBasketMutation
|
10
10
|
} from '@akinon/next/data/client/basket';
|
@@ -21,8 +21,8 @@ export const MultiBasket = (props: Props) => {
|
|
21
21
|
const { data: basketData } = useGetBasketQuery();
|
22
22
|
const { data: allBaskets, isSuccess: isAllBasketsSuccess } =
|
23
23
|
useGetAllBasketsQuery();
|
24
|
+
const [getBasketDetail] = useLazyGetBasketDetailQuery();
|
24
25
|
const { BasketItem } = props;
|
25
|
-
const [getBasketDetail] = useGetBasketDetailMutation();
|
26
26
|
const [removeBasket] = useRemoveBasketMutation();
|
27
27
|
const [selectMainBasket] = useSelectMainBasketMutation();
|
28
28
|
const [detailedBaskets, setDetailedBaskets] = useState<any[]>([]);
|
@@ -53,10 +53,10 @@ export const MultiBasket = (props: Props) => {
|
|
53
53
|
|
54
54
|
return (
|
55
55
|
<>
|
56
|
-
{
|
56
|
+
{detailedBaskets.length > 0 && (
|
57
57
|
<>
|
58
|
-
{detailedBaskets.map((
|
59
|
-
<div key={basket
|
58
|
+
{detailedBaskets.map((basket) => (
|
59
|
+
<div key={basket?.pk}>
|
60
60
|
{basket?.basketitem_set?.length > 0 && (
|
61
61
|
<div className="border mb-4">
|
62
62
|
<div
|