/* global __APP_VERSION__ */ import { useContext } from "react"; import { AuthContext } from "../AuthContext"; import { useTheme } from "../ThemeContext"; import { User, Mail, Contrast, Coffee, Database, MessageSquare } from "lucide-react"; export default function ProfilePage({ user, isOnline, syncing, showSyncedStatus }) { const { logout } = useContext(AuthContext); const { theme, setTheme } = useTheme(); const themeOptions = [ { value: "light", label: "Light" }, { value: "dark", label: "Dark" }, { value: "system", label: "System" } ]; return (
{/* Avatar & Name */}
{user?.username?.[0]?.toUpperCase() || }
{user?.username}
{user?.email}
{isOnline ? (syncing ? "Syncing…" : "All data synced") : "Offline — saved locally"}
{/* Account section */}
Account
Username
{user?.username}
Email
{user?.email}
{/* Sign out */}
{/* Appearance Settings section */}
Appearance
Theme
Customize your viewing experience
{themeOptions.map((opt) => { const active = theme === opt.value; return ( ); })}
{/* App info */}
App
Brew Journal
{__APP_VERSION__}
Storage
Local + PostgreSQL
{/* Support section */}
Support
Feedback
Report an issue or request a feature
); }