- Relocated the button from the bottom sidebar to the header next to the AutoMaker logo. - Updated the button to be a compact icon-only version with a tooltip on hover. - Adjusted the header layout to accommodate the new button placement. - Removed the old button from the sidebar to streamline the UI.
1.8 KiB
Summary
I've implemented the requested feature. Here's what was changed:
Changes Made to apps/app/src/components/ui/course-promo-badge.tsx:
-
Removed the modal dialog completely - The
Dialogcomponent and all its sub-components (DialogContent,DialogHeader,DialogTitle,DialogDescription,DialogFooter) along with the modal state (open) have been removed. -
Changed from button to direct link - The
<button>element that triggered the modal has been replaced with an<a>anchor tag that links directly tohttps://agenticjumpstart.com. -
Simplified imports - Removed unused imports:
- Removed:
Rocket,ExternalLink,Code,MessageSquare,Brain,Terminalfrom lucide-react - Removed: All Dialog-related imports from
./dialog - Removed:
Buttonimport - Kept:
SparklesandX(still needed for the badge UI)
- Removed:
-
Added proper link attributes - Added
target="_blank"to open in a new tab andrel="noopener noreferrer"for security best practices. -
Updated dismiss button - Added
e.preventDefault()to the dismiss button's click handler to prevent the link from being followed when clicking the X to dismiss the badge.
Behavior:
- Before: Clicking "Become a 10x Dev" opened a modal dialog with course information and a "Get Started" button that opened the site
- After: Clicking "Become a 10x Dev" navigates directly to
https://agenticjumpstart.comin a new tab - The dismiss (X) button functionality remains unchanged - clicking it hides the badge
Notes for Developer:
- The TypeScript error shown during build check is unrelated to this change (it's in
use-auto-mode.tsfile and was pre-existing) - The component is now significantly simpler with less code to maintain
- No tests were found specifically for this component, so no test updates were needed