import React, { useEffect } from 'react'; import { useNavigate, useSearchParams } from 'react-router-dom'; import { useAuth } from '../context/AuthContext'; import { Card } from '../components/ui/card'; import { Button } from '../components/ui/button'; import Navbar from '../components/Navbar'; import { CheckCircle, Calendar, User } from 'lucide-react'; const PaymentSuccess = () => { const navigate = useNavigate(); const [searchParams] = useSearchParams(); const { refreshUser } = useAuth(); const sessionId = searchParams.get('session_id'); useEffect(() => { // Refresh user data to get updated status after payment if (refreshUser) { refreshUser(); } }, [refreshUser]); return (
{/* Success Icon */}
{/* Success Message */}

Payment Successful!

Thank you for your payment. Your LOAF membership is now active!

{/* Confirmation Card */}

Welcome to the LOAF Community!

What's Next?

  • Your membership is now active and you have full access to all member benefits
  • You can now RSVP and attend members-only events
  • Access the community directory and connect with other members
  • You'll receive our newsletter with exclusive updates and announcements
{sessionId && (

Transaction ID:{' '} {sessionId}

A confirmation email has been sent to your registered email address.

)}
{/* Action Buttons */}
{/* Additional Info */}

Need help? Contact us at{' '} support@loaf.org

); }; export default PaymentSuccess;