diff --git a/actions/publishToPublication.ts b/actions/publishToPublication.ts index 3f586921..be6bbc1d 100644 --- a/actions/publishToPublication.ts +++ b/actions/publishToPublication.ts @@ -16,6 +16,7 @@ import { PubLeafletBlocksWebsite, PubLeafletBlocksCode, PubLeafletBlocksMath, + PubLeafletBlocksHorizontalRule, } from "lexicons/api"; import { Block } from "components/Blocks/Block"; import { TID } from "@atproto/common"; @@ -232,10 +233,18 @@ function blockToRecord( b.type !== "image" && b.type !== "link" && b.type !== "code" && - b.type !== "math" + b.type !== "math" && + b.type !== "horizontal-rule" ) return; + if (b.type === "horizontal-rule") { + let block: $Typed = { + $type: ids.PubLeafletBlocksHorizontalRule, + }; + return block; + } + if (b.type === "heading") { let [headingLevel] = scan.eav(b.value, "block/heading-level"); diff --git a/app/lish/[did]/[publication]/[rkey]/PostContent.tsx b/app/lish/[did]/[publication]/[rkey]/PostContent.tsx index 849d9a65..632386bd 100644 --- a/app/lish/[did]/[publication]/[rkey]/PostContent.tsx +++ b/app/lish/[did]/[publication]/[rkey]/PostContent.tsx @@ -8,6 +8,7 @@ import { PubLeafletBlocksWebsite, PubLeafletDocument, PubLeafletPagesLinearDocument, + PubLeafletBlocksHorizontalRule, } from "lexicons/api"; import { blobRefToSrc } from "src/utils/blobRefToSrc"; import { TextBlock } from "./TextBlock"; @@ -92,6 +93,9 @@ let Block = ({ `; switch (true) { + case PubLeafletBlocksHorizontalRule.isMain(b.block): { + return
; + } case PubLeafletBlocksUnorderedList.isMain(b.block): { return (