feature/codeant-smoke-test #3
@@ -389,12 +389,10 @@ export function LearningFacilityNew() {
|
||||
const [expandedTourCard, setExpandedTourCard] = useState<string | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
console.log('LearningFacility component mounted'); // Debug log
|
||||
window.scrollTo(0, 0);
|
||||
|
||||
// Listen for custom booking modal event from CTAPopupModal
|
||||
const handleOpenBookingModal = () => {
|
||||
console.log('Custom booking modal event received'); // Debug log
|
||||
handleBookNow();
|
||||
};
|
||||
|
||||
@@ -403,7 +401,6 @@ export function LearningFacilityNew() {
|
||||
// Also check if we should auto-open the booking modal based on URL parameters
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
if (urlParams.get('autoBooking') === 'true') {
|
||||
console.log('Auto-opening booking modal from URL parameter'); // Debug log
|
||||
setTimeout(() => handleBookNow(), 100);
|
||||
}
|
||||
|
||||
@@ -1850,7 +1847,6 @@ function BookingModal({
|
||||
|
||||
const handleFormSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
console.log('Booking form submitted:', bookingForm);
|
||||
// Here you would typically send the form data to your backend
|
||||
alert('Booking request submitted successfully! We will contact you soon.');
|
||||
onClose();
|
||||
|
||||
@@ -18,8 +18,14 @@ export const createSlug = (text: string): string => {
|
||||
* Example: "Ad ut neque enim omn", "e7d611b6-853b-4785-b508-599eeed2af92" -> "ad-ut-neque-enim-omn-e7d611b6-853b-4785-b508-599eeed2af92"
|
||||
*/
|
||||
export const getSlugWithId = (title: string, id: string) => {
|
||||
const slug = createSlug(title);
|
||||
const normalizedId = id.trim();
|
||||
return `${createSlug(title)}-${normalizedId}`;
|
||||
|
||||
if (!slug && !normalizedId) return '';
|
||||
if (!slug) return normalizedId;
|
||||
if (!normalizedId) return slug;
|
||||
|
||||
return `${slug}-${normalizedId}`;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user