import { useState } from "react"; import { Eye, EyeOff, Copy, Check } from "lucide-react"; import Box from "../components/Box.tsx"; import { useAuth } from "../auth/useAuth.ts"; import { formatLocalDate } from "../utils/utils.ts"; const Profile = () => { const { user } = useAuth(); const [keyVisible, setKeyVisible] = useState(false); const [copied, setCopied] = useState(false); const handleCopy = () => { if (!user?.streamKey) return; navigator.clipboard.writeText(user.streamKey); setCopied(true); setTimeout(() => setCopied(false), 2000); }; if (!user) { return (
{user.name}
@{user.username}
{user.email}
Member since {formatLocalDate(user.createdAt)}
Use this key in OBS or any RTMP-compatible software to start streaming. Keep it private — anyone with this key can stream to your account.