import React, { useState } from 'react'; import { Link } from 'react-router-dom'; import { motion } from 'framer-motion'; import { useAuth } from '@/contexts/SupabaseAuthContext'; import { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, DropdownMenuGroup } from '@/components/ui/dropdown-menu'; import { User, LogOut, Shield, Mail, Loader2 } from 'lucide-react'; import AeThexLogo from './AeThexLogo'; import { Input } from './ui/input'; import { supabase } from '@/lib/customSupabaseClient'; import { useToast } from './ui/use-toast'; const NewsletterForm = () => { const [email, setEmail] = useState(''); const [loading, setLoading] = useState(false); const { toast } = useToast(); const handleSubmit = async (e) => { e.preventDefault(); setLoading(true); const { error } = await supabase.from('newsletter_subscribers').insert({ email }); if (error) { toast({ variant: 'destructive', title: 'Subscription Failed', description: error.code === '23505' ? 'This email is already subscribed.' : error.message, }); } else { toast({ title: 'Subscribed!', description: 'Thank you for subscribing to the AeThex newsletter.', }); setEmail(''); } setLoading(false); }; return (

Stay Updated

Join our newsletter for updates on our progress and new opportunities.

setEmail(e.target.value)} required disabled={loading} className="bg-slate-800/50 border-slate-700" />
); }; const Footer = ({ onAuthClick }) => { const { user, profile, signOut } = useAuth(); const isAdmin = profile && ['admin', 'site_owner', 'oversee'].includes(profile.role); const avatarUrl = profile?.avatar_url || `https://api.dicebear.com/7.x/bottts/svg?seed=${user?.id}`; const UserMenu = () => ( {profile?.username

{profile?.full_name || profile?.username}

{profile?.email}

My Profile {isAdmin && ( Admin Panel )} Log out
); return ( ); }; export default Footer;