not working-
I need more information to help you debug the issue. Could you please clarify which feature is not working?
Also, please provide:
Once I understand what's not working, I'll quickly diagnose and fix it!
Got it! The "Contact Us" button on the first carousel slide is not working. Let me investigate and fix this:
I can see the issue! The button is using <Link href={slide.ctaLink}> which won't work properly with anchor links like #contact. The Link component tries to navigate instead of scrolling. Let me check what the carousel data looks like:
I found the issue. The buttons have ctaLink: "#contact" which are anchor links. The problem is that the button is wrapped in a Link component that tries to navigate instead of scroll. I need to change the carousel component to handle anchor links properly:
Now update the button to use this handler instead of Link:
Now remove the unused Link import:
Now let me build and test:
Build succeeded. Let me create a summary:
I've fixed the carousel buttons. The problem was that the buttons were using a Link component which doesn't work properly with anchor links (like #contact, #services, #offers).
The carousel button was wrapped in a Next.js Link component:
<Button asChild>
<Link href={slide.ctaLink}>{slide.cta}</Link>
</Button>This doesn't work for anchor links because Link tries to do client-side navigation instead of scrolling to the element.
Created handleButtonClick() function that:
#)scrollIntoView()Updated the button to use the handler instead of Link component:
<Button onClick={() => handleButtonClick(slide.ctaLink)}>
{slide.cta}
</Button>The carousel buttons now work smoothly and properly navigate to their target sections!