This repository was archived by the owner on Mar 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ interface IAsset {
2929}
3030
3131interface IBlockContent {
32- text : Array < IRichText >
32+ rich_text : Array < IRichText >
3333}
3434
3535export interface IRichText {
Original file line number Diff line number Diff line change @@ -3,23 +3,25 @@ import TextRenderer from "./TextRenderer"
33import BLOCKS from "./blocks"
44
55const blockToText = ( block : IBlock ) => {
6+ console . log ( block . type )
7+ console . log ( block )
68 switch ( block . type ) {
79 case BLOCKS . PARAGRAPH :
8- return TextRenderer ( block . paragraph . text )
10+ return TextRenderer ( block . paragraph . rich_text )
911 case BLOCKS . HEADING1 :
10- return TextRenderer ( block . heading_1 . text )
12+ return TextRenderer ( block . heading_1 . rich_text )
1113 case BLOCKS . HEADING2 :
12- return TextRenderer ( block . heading_2 . text )
14+ return TextRenderer ( block . heading_2 . rich_text )
1315 case BLOCKS . HEADING3 :
14- return TextRenderer ( block . heading_3 . text )
16+ return TextRenderer ( block . heading_3 . rich_text )
1517 case BLOCKS . BULLETEDLISTITEM :
16- return TextRenderer ( block . bulleted_list_item . text )
18+ return TextRenderer ( block . bulleted_list_item . rich_text )
1719 case BLOCKS . NUMBEREDLISTITEM :
18- return TextRenderer ( block . numbered_list_item . text )
20+ return TextRenderer ( block . numbered_list_item . rich_text )
1921 case BLOCKS . QUOTE :
20- return TextRenderer ( block . quote . text )
22+ return TextRenderer ( block . quote . rich_text )
2123 case BLOCKS . CODE :
22- return TextRenderer ( block . code . text )
24+ return TextRenderer ( block . code . rich_text )
2325 }
2426}
2527
You can’t perform that action at this time.
0 commit comments