diff --git a/estore/src/components/ColorPicker.tsx b/estore/src/components/ColorPicker.tsx index 7686bf3..3f833de 100644 --- a/estore/src/components/ColorPicker.tsx +++ b/estore/src/components/ColorPicker.tsx @@ -151,9 +151,9 @@ export default function ColorPicker({ product, maxColors, onClose, editingEntry
e.stopPropagation()}> -
-

{product.name}

-
diff --git a/estore/src/components/FeaturedProducts.tsx b/estore/src/components/FeaturedProducts.tsx index 5bcbcf6..9ea21fc 100644 --- a/estore/src/components/FeaturedProducts.tsx +++ b/estore/src/components/FeaturedProducts.tsx @@ -48,6 +48,12 @@ export default function FeaturedProducts() { setShowTour(true) } + const tourInit = () => { + setCategory('all') + setSearch('') + setSearchOpen(false) + } + const endTour = () => { setShowTour(false) // Close any customization modal that may have been opened during the tour @@ -224,7 +230,7 @@ export default function FeaturedProducts() { {/* Welcome modal + guided tour */} {showWelcome && } - {showTour && } + {showTour && } {/* Product grid */} {loading ? ( @@ -244,11 +250,11 @@ export default function FeaturedProducts() {

) : (
- {filtered.map((item, index) => ( + {filtered.map((item) => (
diff --git a/estore/src/components/GuidedTour.tsx b/estore/src/components/GuidedTour.tsx index e6daeaa..9193c15 100644 --- a/estore/src/components/GuidedTour.tsx +++ b/estore/src/components/GuidedTour.tsx @@ -57,10 +57,11 @@ const PAD = 10 // px padding around spotlight const TIP_WIDTH = 300 // tooltip width in px interface Props { - onDone: () => void + onDone: () => void + onStart?: () => void } -export default function GuidedTour({ onDone }: Props) { +export default function GuidedTour({ onDone, onStart }: Props) { const [step, setStep] = useState(0) const [targetRect, setTargetRect] = useState(null) @@ -72,6 +73,12 @@ export default function GuidedTour({ onDone }: Props) { if (el) setTargetRect(el.getBoundingClientRect()) }, [current.target]) + // Switch to All tab and pick the 11" Latex card as the tour example on mount + useEffect(() => { + onStart?.() + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []) + // On step change: fire onEnter, poll until target appears, then scroll + measure. useEffect(() => { setTargetRect(null) // clear stale rect immediately