import { cn } from '../lib/classname.ts'; import { memo, useEffect, useState } from 'react'; import { useScrollPosition } from '../hooks/use-scroll-position.ts'; import { X } from 'lucide-react'; type OnboardingNudgeProps = { onStartOnboarding: () => void; }; export const NUDGE_ONBOARDING_KEY = 'should_nudge_onboarding'; export function OnboardingNudge(props: OnboardingNudgeProps) { const { onStartOnboarding } = props; const [isLoading, setIsLoading] = useState(false); const { y: scrollY } = useScrollPosition(); useEffect(() => { if (localStorage.getItem(NUDGE_ONBOARDING_KEY) === null) { localStorage.setItem(NUDGE_ONBOARDING_KEY, 'true'); } }, []); if (localStorage.getItem(NUDGE_ONBOARDING_KEY) !== 'true') { return null; } if (scrollY < 100) { return null; } return (
Welcome! Please take a moment to{' '}