feat: json rich text editor, blocks, asides, general structure
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import List from "./Blocks/List"
|
||||
import Preamble from "./Blocks/Preamble"
|
||||
import Puffs from "./Blocks/Puffs"
|
||||
import Text from "./Blocks/Text"
|
||||
|
||||
@@ -12,14 +11,12 @@ export default function Blocks({ blocks }: BlocksProps) {
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<section id="mainbody_personalized">
|
||||
{blocks.map(block => {
|
||||
const type = block.__typename
|
||||
switch (type) {
|
||||
case BlocksTypenameEnum.CurrentBlocksPageBlocksList:
|
||||
return <List key={block.__typename} {...block} />
|
||||
case BlocksTypenameEnum.CurrentBlocksPageBlocksPreamble:
|
||||
return <Preamble key={block.__typename} {...block} />
|
||||
case BlocksTypenameEnum.CurrentBlocksPageBlocksPuffs:
|
||||
return <Puffs key={block.__typename} {...block} />
|
||||
case BlocksTypenameEnum.CurrentBlocksPageBlocksText:
|
||||
@@ -29,6 +26,7 @@ export default function Blocks({ blocks }: BlocksProps) {
|
||||
return null
|
||||
}
|
||||
})}
|
||||
</>
|
||||
<div id="mainarea_personalized"></div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user