Skip to content

Commit 9a77810

Browse files
ascorbicgatsbybot
and
gatsbybot
authored
fix(gatsby): Add bodyComponent to replaceRenderer args (#28456)
Co-authored-by: gatsbybot <[email protected]>
1 parent 9e07066 commit 9a77810

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/gatsby/cache-dir/api-ssr-docs.js

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* rendering.
1010
* @param {object} $0
1111
* @param {string} $0.pathname The pathname of the page currently being rendered.
12+
* @param {ReactNode} $0.bodyComponent The React element to be rendered as the page body
1213
* @param {function} $0.replaceBodyHTMLString Call this with the HTML string
1314
* you render. **WARNING** if multiple plugins implement this API it's the
1415
* last plugin that "wins". TODO implement an automated warning against this.

packages/gatsby/index.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,7 @@ export interface RenderBodyArgs extends NodePluginArgs {
921921

922922
export interface ReplaceRendererArgs extends NodePluginArgs {
923923
replaceBodyHTMLString: (str: string) => void
924+
bodyComponent: React.ReactNode
924925
setHeadComponents: (comp: React.ReactNode[]) => void
925926
setHtmlAttributes: (attr: ReactProps<HTMLHtmlElement>) => void
926927
setBodyAttributes: (attr: ReactProps<HTMLBodyElement>) => void
@@ -1285,7 +1286,7 @@ export interface Actions {
12851286
traceId?: string
12861287
): void
12871288

1288-
printTypeDefinitions (
1289+
printTypeDefinitions(
12891290
path?: string,
12901291
include?: { types?: Array<string>; plugins?: Array<string> },
12911292
exclude?: { types?: Array<string>; plugins?: Array<string> },

0 commit comments

Comments
 (0)