fix: utilise le callaout block de partout

This commit is contained in:
Sébastien Arod 2024-10-23 17:46:49 +02:00
parent 41c4fdf7a2
commit 539e1a9e38

View file

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