a tool for shared writing and social publishing

make heading levels match draft

+7 -9
+7 -9
app/lish/[did]/[publication]/[rkey]/page.tsx
··· 17 17 import { ThemeProvider } from "components/ThemeManager/ThemeProvider"; 18 18 import { BlobRef, BskyAgent } from "@atproto/api"; 19 19 import { SubscribeWithBluesky } from "app/lish/Subscribe"; 20 + import { blobRefToSrc } from "src/utils/blobRefToSrc"; 20 21 21 22 export async function generateMetadata(props: { 22 23 params: Promise<{ publication: string; did: string; rkey: string }>; ··· 263 264 case PubLeafletBlocksHeader.isMain(b.block): { 264 265 if (b.block.level === 1) 265 266 return ( 266 - <h2 className={`${className}`}> 267 + <h1 className={`${className}`}> 267 268 <TextBlock {...b.block} /> 268 - </h2> 269 + </h1> 269 270 ); 270 271 if (b.block.level === 2) 271 272 return ( 272 - <h3 className={`${className}`}> 273 + <h2 className={`${className}`}> 273 274 <TextBlock {...b.block} /> 274 - </h3> 275 + </h2> 275 276 ); 276 277 if (b.block.level === 3) 277 278 return ( 278 - <h4 className={`${className}`}> 279 + <h3 className={`${className}`}> 279 280 <TextBlock {...b.block} /> 280 - </h4> 281 + </h3> 281 282 ); 282 283 // if (b.block.level === 4) return <h4>{b.block.plaintext}</h4>; 283 284 // if (b.block.level === 5) return <h5>{b.block.plaintext}</h5>; ··· 291 292 return null; 292 293 } 293 294 }; 294 - 295 - const blobRefToSrc = (b: BlobRef["ref"], did: string) => 296 - `/api/atproto_images?did=${did}&cid=${(b as unknown as { $link: string })["$link"]}`; 297 295 298 296 function ListItem(props: { 299 297 item: PubLeafletBlocksUnorderedList.ListItem;