import { AtUri } from '@atproto/syntax' import type { Post } from '#/db/schema' import { html } from '../view' import { shell } from './shell' type Props = { posts: Post[]; profile?: { displayName?: string; handle: string } } export function home(props: Props) { return shell({ title: 'Home', content: content(props), }) } function content({ posts, profile }: Props) { return html`

Welcome to the Atmosphere

${ profile ? html`

Hi, ${profile.displayName || profile.handle}. It's pretty special here.

` : html`

It's pretty special here. Log in.

` } Give me more
` } function toBskyLink(uriStr: string) { const uri = new AtUri(uriStr) return `https://bsky.app/profile/${uri.host}/post/${uri.rkey}` }