Fix Tim Coding.
This commit is contained in:
Binary file not shown.
@@ -95,5 +95,6 @@
|
||||
"telephone": "Telefon",
|
||||
"basketEmpty": "Der Warenkorb ist leer.",
|
||||
"login": "Anmelden",
|
||||
"total": "Insgesamt"
|
||||
"total": "Insgesamt",
|
||||
"admin": "Admin"
|
||||
}
|
||||
|
||||
@@ -95,5 +95,6 @@
|
||||
"telephone": "Telephone",
|
||||
"basketEmpty": "The shopping cart is empty.",
|
||||
"login": "Login",
|
||||
"total": "Total"
|
||||
"total": "Total",
|
||||
"admin": "Admin"
|
||||
}
|
||||
@@ -117,8 +117,16 @@ export default function Payment() {
|
||||
</Alert>
|
||||
};
|
||||
|
||||
const { refetch: refetchSubmit, isError: orderIsError } = useQuery({
|
||||
queryKey: ["submitOrder", submitOrderData],
|
||||
queryFn: () => submitOrder(submitOrderData),
|
||||
retry: 0,
|
||||
retryDelay: 1000,
|
||||
enabled: false,
|
||||
});
|
||||
|
||||
const handleNext = async () => {
|
||||
var next: boolean = true;
|
||||
let next: boolean = true;
|
||||
|
||||
if (activeStep === steps.length - 2) {
|
||||
// Simulate order placement and generate order number
|
||||
@@ -130,13 +138,7 @@ export default function Payment() {
|
||||
console.log(await (await refetchCustomer()).data.id);
|
||||
submitOrderData.customerId = await (await refetchCustomer()).data.id; // Get the customer ID from the response
|
||||
}
|
||||
const { refetch: refetchSubmit, isError: orderIsError } = useQuery({
|
||||
queryKey: ["submitOrder", submitOrderData],
|
||||
queryFn: () => submitOrder(submitOrderData),
|
||||
retry: 0,
|
||||
retryDelay: 1000,
|
||||
enabled: false,
|
||||
});
|
||||
|
||||
void refetchSubmit(); // Submit order data
|
||||
if(orderIsError) {
|
||||
next = false
|
||||
|
||||
Reference in New Issue
Block a user