Skip to content

Commit eb723cb

Browse files
committed
fix message display
1 parent 8268074 commit eb723cb

File tree

1 file changed

+2
-2
lines changed
  • frontend/src/components/routes/product-widget/Payment

1 file changed

+2
-2
lines changed

frontend/src/components/routes/product-widget/Payment/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {showError} from "../../../../utilites/notifications.tsx";
1919
const Payment = () => {
2020
const navigate = useNavigate();
2121
const {eventId, orderShortId} = useParams();
22-
const {data: event} = useGetEventPublic(eventId);
22+
const {data: event, isFetched: isEventFetched} = useGetEventPublic(eventId);
2323
const {data: order, isFetched: isOrderFetched} = useGetOrderPublic(eventId, orderShortId, ['event']);
2424
const isLoading = !isOrderFetched;
2525
const [isPaymentLoading, setIsPaymentLoading] = useState(false);
@@ -69,7 +69,7 @@ const Payment = () => {
6969
}
7070
};
7171

72-
if (!isStripeEnabled && !isOfflineEnabled) {
72+
if (!isStripeEnabled && !isOfflineEnabled && isOrderFetched && isEventFetched) {
7373
return (
7474
<CheckoutContent>
7575
<Card>

0 commit comments

Comments
 (0)