fix: utilise le callaout block de partout
parent
41c4fdf7a2
commit
539e1a9e38
|
@ -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,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue