Merge pull request 'Fix booking flow scroll position on mobile step changes.' (#20) from dev into main
Reviewed-on: #20
This commit is contained in:
@@ -228,6 +228,12 @@ export default function BookingPage() {
|
|||||||
}
|
}
|
||||||
}, [agreedToTerms, termsError]);
|
}, [agreedToTerms, termsError]);
|
||||||
|
|
||||||
|
// Scroll to top when moving between booking steps (esp. mobile, where
|
||||||
|
// the submit button sits at the bottom of a long form)
|
||||||
|
useEffect(() => {
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||||
|
}, [step]);
|
||||||
|
|
||||||
const formatDate = (dateStr: string) => formatDateLong(dateStr, locale as 'en' | 'es');
|
const formatDate = (dateStr: string) => formatDateLong(dateStr, locale as 'en' | 'es');
|
||||||
const fmtTime = (dateStr: string) => formatTime(dateStr, locale as 'en' | 'es');
|
const fmtTime = (dateStr: string) => formatTime(dateStr, locale as 'en' | 'es');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user