a tool for shared writing and social publishing
at d30f8e8d8a4d68d80b09c6b2a6787f74bcb99b4e 11 lines 272 B view raw
1import { useBlocks } from "./useBlocks"; 2 3export function usePageMetadata(entityID: string) { 4 let blocks = useBlocks(entityID); 5 6 let textBlocks = blocks.filter( 7 (block) => block.type === "text" || block.type === "heading", 8 ); 9 10 return textBlocks.slice(0, 3); 11}