fix: utilise le callaout block de partout

wip-related-pages
Sébastien Arod 2024-10-23 17:46:49 +02:00
parent 41c4fdf7a2
commit 539e1a9e38
1 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ import {
} from "../../../statistiques/v2/desc/StatsDesc"; } from "../../../statistiques/v2/desc/StatsDesc";
import { createStatGroupChildrenListItemBlock } from "./createStatGroupListItemBlock"; import { createStatGroupChildrenListItemBlock } from "./createStatGroupListItemBlock";
import { updatePageContent } from "./updatePageContent"; import { updatePageContent } from "./updatePageContent";
import { createParagraphBlock } from "../blocks/createParagraphBlock"; import { createCalloutBlock } from "../blocks/createCalloutBlock";
export async function publishStatsToPage<D extends StatGroupDesc>( export async function publishStatsToPage<D extends StatGroupDesc>(
notionClient: Client, notionClient: Client,
@ -16,9 +16,9 @@ export async function publishStatsToPage<D extends StatGroupDesc>(
) { ) {
const statsBlocks = createStatGroupChildrenListItemBlock(descriptor, stats); const statsBlocks = createStatGroupChildrenListItemBlock(descriptor, stats);
const textBlock = createParagraphBlock(pageHeader); const headerBlock = createCalloutBlock(pageHeader);
await updatePageContent(notionClient, statsPageId, [ await updatePageContent(notionClient, statsPageId, [
textBlock, headerBlock,
...statsBlocks, ...statsBlocks,
]); ]);
} }