diff --git a/hooks/use-post/index.js b/hooks/use-post/index.ts similarity index 74% rename from hooks/use-post/index.js rename to hooks/use-post/index.ts index e78703dd..fa07a7a3 100644 --- a/hooks/use-post/index.js +++ b/hooks/use-post/index.ts @@ -20,8 +20,8 @@ export function usePost() { const hasBlockContext = !!blockContextPostId && !!blockContextPostType; return { - postId: blockContextPostId || globalPostId, - postType: blockContextPostType || globalPostType, - isEditable: hasBlockContext ? blockContextIsEditable : true, + postId: (blockContextPostId || globalPostId) as number | null, + postType: (blockContextPostType || globalPostType) as string, + isEditable: (hasBlockContext ? blockContextIsEditable : true) as boolean | null, }; }