import React, { useState } from 'react'; import { motion } from 'framer-motion'; import { QRCodeSVG } from 'qrcode.react'; import { Copy, Check } from 'lucide-react'; import { Input, Button, Label } from '@librechat/client'; import { useLocalize } from '~/hooks'; import { cn } from '~/utils'; const fadeAnimation = { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -20 }, transition: { duration: 0.2 }, }; interface QRPhaseProps { secret: string; otpauthUrl: string; onNext: () => void; onSuccess?: () => void; onError?: (error: Error) => void; } export const QRPhase: React.FC = ({ secret, otpauthUrl, onNext }) => { const localize = useLocalize(); const [isCopying, setIsCopying] = useState(false); const handleCopy = async () => { await navigator.clipboard.writeText(secret); setIsCopying(true); setTimeout(() => setIsCopying(false), 2000); }; return (
); };