'use client'; import React, { useState } from 'react'; import { useAuth } from '@/context/AuthContext'; interface AboutPageProps { userEmail?: string; } export default function AboutPage({ userEmail }: AboutPageProps) { const { logout, deleteAccount, sendVerificationEmail, user } = useAuth(); const [showLogoutConfirm, setShowLogoutConfirm] = useState(false); const [showDeleteDialog, setShowDeleteDialog] = useState(false); const [deleteStep, setDeleteStep] = useState(0); // 0=initial, 1=first confirm, 2=second confirm, 3=type DELETE, 4=type email const [deleteConfirmText, setDeleteConfirmText] = useState(''); const [deleteEmail, setDeleteEmail] = useState(''); const [deleteLoading, setDeleteLoading] = useState(false); const [deleteError, setDeleteError] = useState(''); const [verificationMessage, setVerificationMessage] = useState(''); const [sendingVerification, setSendingVerification] = useState(false); return (
{/* Header */}

About

Haver - Your Prayer Companion

{/* About Card */}
{/* Haver Meaning Section */}

Haver חבר

Haver is a Hebrew word (חבר) meaning "friend," "companion," or "associate."

Pronounced: ha-VER (stress on the second syllable)

In Jewish culture, Haver represents the importance of building bonds and connections among peers. It reflects shared experiences and support within a community.

This app is your spiritual companion—a friend on your prayer journey, helping you connect with God and track your faith walk.

{/* Account Section */}

Account

Email

{userEmail || 'Not set'}

Verification Status

{user?.emailVerified ? (
Verified
) : (
Not verified
{verificationMessage && (
{verificationMessage}
)}
)}
{/* App Info Section */}

App Info

Haver v1.0

A simple, private space for your daily prayers and reflections.

{/* Logout and Delete Section */}
{/* Logout Confirmation Modal */} {showLogoutConfirm && (

Logout?

Are you sure you want to logout?

)} {/* Delete Account Multi-Step Modal */} {showDeleteDialog && (
{deleteStep === 0 && ( <>

⚠️ Delete Account?

This action cannot be undone.

All your prayers, reflections, and account data will be permanently deleted.

)} {deleteStep === 1 && ( <>

Are you absolutely sure?

You will lose all your prayers and data. This is permanent.

)} {deleteStep === 2 && ( <>

Type DELETE to confirm

Enter the word "DELETE" to proceed:

setDeleteConfirmText(e.target.value.toUpperCase())} placeholder="Type DELETE" className="w-full p-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 mb-4 focus:ring-2 focus:ring-red-500 focus:border-transparent" />
{deleteError &&

{deleteError}

} )} {deleteStep === 3 && ( <>

Confirm your email

Enter your email to verify:

setDeleteEmail(e.target.value)} placeholder="Enter your email" className="w-full p-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 mb-4 focus:ring-2 focus:ring-red-500 focus:border-transparent" />
{deleteError &&

{deleteError}

} )} {deleteStep === 4 && ( <>

Final confirmation

Check this box to confirm you understand your account will be permanently deleted:

{deleteError &&

{deleteError}

} )}
)}
); }