import { useState } from 'react'; import { Button } from '@/components/ui/button'; import { Card, CardContent } from '@/components/ui/card'; import { Progress } from '@/components/ui/progress'; import { cn } from '@/lib/utils'; import { Globe, Lock, Unlock, Key, ChevronRight, ChevronLeft, CheckCircle2, AlertTriangle, Store, Users, Shield, } from 'lucide-react'; interface RelayEducationProps { onComplete: () => void; onSkip?: () => void; } export function RelayEducation({ onComplete, onSkip }: RelayEducationProps) { const [currentStep, setCurrentStep] = useState(1); const totalSteps = 3; const nextStep = () => { if (currentStep < totalSteps) { setCurrentStep(currentStep + 1); } else { onComplete(); } }; const prevStep = () => { if (currentStep > 1) { setCurrentStep(currentStep - 1); } }; return ( {/* Progress */}
Understanding Nostr Step {currentStep} of {totalSteps}
{/* Step 1: Relay Concept */} {currentStep === 1 && (

Understanding Relays

Think of relays like skate shops that share news about spots

{/* Visual Diagram */}
🛹
You
Relays
Skaters
No company owns your account

Your identity lives on multiple relay servers

Your posts can't be deleted by others

Data is distributed across the network

Relay operators can see public posts

Think of it like posting on a bulletin board

)} {/* Step 2: Public vs Private */} {currentStep === 2 && (

Public vs Private

Know what's visible and what's encrypted

{/* Public */}
Public (Anyone Can See)
• Spots you add to the map
• Reviews and comments
• Your profile info (name, picture)
• Who you follow
{/* Private */}
Private (Encrypted)
• Direct messages
• Wallet communications

Note: Posts may be stored permanently on relays. Think before you post - just like real life!

)} {/* Step 3: Key Backup */} {currentStep === 3 && (

Your Keys = Your Account

This is the most important thing to understand

Your Secret Key (nsec)

Think of it like your skateboard - never lend it to anyone. It proves you own your account.

⚠️ If lost, your account can't be recovered
⚠️ No "forgot password" - nobody can reset it
✓ Back it up and store it safely

Your Public Key (npub)

This is like your username - share it freely so others can find you!

🔐 You're in control - no company can lock you out!

)} {/* Navigation */}
{currentStep > 1 ? ( ) : onSkip ? ( ) : (
)}
); }