- {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