"use client"; /** * /settings — the top-level user-settings screen. * * Lives outside the /u/me profile layout so it doesn't carry the * ProfileHeader + tabs that frame the profile views. It sits directly * under (app)/, which gives it the default site chrome (sidebar, header, * etc.) without the profile-specific frame on top. * * Sections are stacked plain — no per-section card chrome — so the page * reads as a single ordered list of preferences rather than a dashboard * of widgets. To add a new section, drop another
in the * `
` below. */ import { useState } from "react"; import Link from "next/link"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { ChangePasswordModal } from "@/components/auth/change-password-modal"; import { ReadingSettings } from "@/components/reading-settings"; const BFF_BASE = process.env.NEXT_PUBLIC_BFF_URL || "http://localhost:8080"; export default function SettingsPage() { return (
Back to profile

Settings

); } function Section({ title, description, children, }: { title: string; description?: string; children: React.ReactNode; }) { return (

{title}

{description ? (

{description}

) : null}
{children}
); } // ─── Authentication ──────────────────────────────────────────────────── function AuthenticationSection() { const [pwModalOpen, setPwModalOpen] = useState(false); const next = "/settings"; function startOAuth(provider: "facebook" | "google") { const u = new URL(`${BFF_BASE}/api/v1/auth/oauth/${provider}/start`); u.searchParams.set("next", next); return u.toString(); } return ( <> setPwModalOpen(false)} /> ); } // ─── Legal ───────────────────────────────────────────────────────────── function LegalSection() { return (
); } function LegalLink({ href, label }: { href: string; label: string }) { return (
  • {label}
  • ); } // ─── Row helper ──────────────────────────────────────────────────────── function FacebookGlyph() { return ( ); } function Row({ icon, label, description, action, }: { icon?: React.ReactNode; label: string; description?: string; action: React.ReactNode; }) { return (
  • {icon ? {icon} : null} {label}
    {description ? (

    {description}

    ) : null}
    {action}
  • ); }