loading button nsubmit

This commit is contained in:
hamid zarghami
2025-12-24 16:10:58 +03:30
parent 41800bbee8
commit 86f23fb8ad
@@ -27,8 +27,8 @@ export const SummarySection = ({ cartModal, onToggleCartModal, deliveryType }: S
const { t } = useTranslation('parallels', { keyPrefix: 'OrderDetail' });
const { isSelectedAddress, isSelectedShipment, isSelectedPayment, deliveryType: storeDeliveryType, paymentType, selectedAddressId, tableNumber, carAddress, clear } = useCheckoutStore();
const { description, reset: resetCart } = useCartStore();
const { mutate: createOrder } = useCreateOrder();
const { mutate: saveAllMethod } = useSaveAllMethod()
const { mutate: createOrder, isPending: isCreateOrderPending } = useCreateOrder();
const { mutate: saveAllMethod, isPending: isSaveAllMethodPending } = useSaveAllMethod()
const params = useParams();
const name = params.name as string;
const { isSuccess } = useGetProfile();
@@ -190,7 +190,7 @@ export const SummarySection = ({ cartModal, onToggleCartModal, deliveryType }: S
<div className='text-xs text-gray-400 dark:text-gray-500'>{t("PayableAmountLabel")}</div>
<div className='text-sm mt-2 font-semibold'>{formatPrice(total)} تومان</div>
</div>
<Button onClick={handleSubmit} className='px-10 w-fit'>
<Button pending={isCreateOrderPending || isSaveAllMethodPending} onClick={handleSubmit} className='px-10 w-fit'>
{t("ButtonSubmit")}
</Button>
</div>