Scratch space for learning atproto app development
1import { html } from '../view' 2import { shell } from './shell' 3 4type Props = { error?: string } 5 6export function login(props: Props) { 7 return shell({ 8 title: 'Login', 9 content: content(props), 10 }) 11} 12 13function content({ error }: Props) { 14 return html`<div id="root"> 15 <form action="/login" method="post"> 16 <input type="text" name="handle" placeholder="handle" required /> 17 <button type="submit">Log in.</button> 18 ${error ? html`<p>Error: <i>${error}</i></p>` : undefined} 19 </form> 20 </div>` 21}