import * as React from "react"; import { Box, Typography, Button, Avatar, Paper, CircularProgress, } from "@mui/material"; export interface ProfileViewProps { name: string; username: string; email: string; onEdit?: () => void; loading?: boolean; } export function ProfileView({ name, username, email, onEdit, loading = false, }: ProfileViewProps) { const initials = (name || username) .split(" ") .map((s) => s[0]) .join("") .toUpperCase() .slice(0, 2); return ( {initials} {name || username} @{username} Email {email} {onEdit && ( )} ); }