diff --git a/components/Checkout/CheckoutForm.component.jsx b/components/Checkout/CheckoutForm.component.jsx index e2bc63ac4..6da7dd59a 100644 --- a/components/Checkout/CheckoutForm.component.jsx +++ b/components/Checkout/CheckoutForm.component.jsx @@ -21,7 +21,7 @@ const CheckoutForm = () => { const [cart, setCart] = useContext(AppContext); const [orderData, setOrderData] = useState(null); const [requestError, setRequestError] = useState(null); - const [orderCompleted, setorderCompleted] = useState(false); + const [orderCompleted, setorderCompleted] = useState(false); // Checkout GraphQL mutation const [ @@ -74,10 +74,15 @@ const CheckoutForm = () => { {/* Order*/} - {/*Payment Details*/} - + {/*Error display*/} + {requestError && ( +
+ En feil har oppstått. Feilmeldingen er:
$ + {requestError.toString()} +
+ )} {/* Checkout Loading*/} {checkoutLoading && (
@@ -86,7 +91,6 @@ const CheckoutForm = () => {
)} - {requestError} ) : ( <>