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