-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/same device #13
Feat/same device #13
Conversation
Quality Gate passedIssues Measures |
49facaa
into
eu-digital-identity-wallet:main
const deviceType = useAppStore((state) => state.deviceType); | ||
|
||
const onSubmit = async (data: BookingDto) => { | ||
console.log(data); | ||
await createBookingAsync(data); | ||
}; | ||
|
||
// Watch for changes in bookingCreateRes | ||
useEffect(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be simplified as:
useEffect(() => {
if (bookingCreateRes?.url) {
deviceType === 'desktop' ? changeModalStatus(ModalStatus.OPEN) : (window.location.href = bookingCreateRes.url);
}
}, [bookingCreateRes?.url, deviceType, changeModalStatus]);
@@ -24,7 +24,7 @@ const ConfirmationDetails = ({ | |||
reservationDate, | |||
} = details; | |||
const { isLoading, issueConfirmationAsync } = useBookingStore(); | |||
|
|||
console.log(id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot this console.log?
router.push(PATHS.confirmation(bookingId)); // Navigate to confirmation page | ||
} | ||
|
||
// Timeout logic to stop polling after 30 seconds | ||
const timeout = setTimeout(() => { | ||
stopPolling(); // Stop polling after 30 seconds | ||
}, 30000); | ||
}, 60000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be an env var
@@ -36,14 +36,15 @@ export const useBookingVerify = () => { | |||
const { data, error } = useSWR( | |||
bookingId, | |||
fetcher, | |||
{ refreshInterval: polling ? 1000 : 0 } // Poll every second if polling is true | |||
{ refreshInterval: polling ? 3000 : 0 } // Poll every second if polling is true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be an env var
issue verification for same device