'use client'; import { useState } from 'react'; import { mixpanelClient } from '@/utils/mixpanel'; import { usePathname } from 'next/navigation'; import { ThumbsUp, ThumbsDown } from 'lucide-react'; import { cn } from '@/utils/cn'; export function Feedback() { const pathname = usePathname(); const [voted, setVoted] = useState(null); const handleVote = (useful: boolean) => { setVoted(useful); mixpanelClient.track('helpfulness_vote', { path: pathname, useful: useful, }); }; if (voted !== null) { return (

Thanks for your feedback!

); } return (

Was this page helpful?

); }