"use client" import { useEffect, useState } from "react" import { SiteHeader } from "@/components/site-header" import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card" interface ConfigInfo { version: string public_url: string database_backend: string jetstream_url: string relay_url: string plc_url: string } export default function AboutPage() { const [config, setConfig] = useState(null) const [error, setError] = useState(null) useEffect(() => { fetch(`${process.env.NEXT_PUBLIC_BASE_PATH || ""}/config`, { credentials: "same-origin" }) .then((r) => { if (!r.ok) throw new Error("Failed to load config") return r.json() }) .then(setConfig) .catch((e) => setError(e.message)) }, []) const rows: { label: string; value: string | undefined }[] = config ? [ { label: "Version", value: config.version }, { label: "Public URL", value: config.public_url }, { label: "Database", value: config.database_backend }, { label: "Jetstream", value: config.jetstream_url }, { label: "Relay", value: config.relay_url }, { label: "PLC Directory", value: config.plc_url }, ] : [] return ( <>
{error &&

{error}

} HappyView ATProto AppView instance information {config ? (
{rows.map((row) => (
{row.label}
{row.value ?? "—"}
))}
) : ( !error && (

Loading...

) )}
) }