import { useState } from 'react' import { AtUriBrowser, useAtUriBrowser } from './components/AtUriBrowser' import './App.css' function BrowserContent() { const [handle, setHandle] = useState('') const { records, currentRecord, setCurrentRecord, loading, error, loadHandle } = useAtUriBrowser() const handleSubmit = async (e: React.FormEvent) => { e.preventDefault() if (handle) { await loadHandle(handle) } } return (

AT Protocol Browser

setHandle(e.target.value)} className="at-uri-input" />
{error && (

Error: {error}

)} {currentRecord ? (

{currentRecord.value.title}

URI: {currentRecord.uri}

Created: {new Date(currentRecord.value.createdAt).toLocaleString()}

{currentRecord.value.content}
) : records.length > 0 ? (

Posts ({records.length})

) : !loading && !error && (

About

Browse AT Protocol records directly from the PDS.

)} ← Back to Blog
) } function App() { return ( ) } export default App