Skip to content

Commit

Permalink
fix(gatsby): Add bodyComponent to replaceRenderer args (#28456) (#28486)
Browse files Browse the repository at this point in the history
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
(cherry picked from commit 9a77810)

Co-authored-by: Matt Kane <matt@gatsbyjs.com>
  • Loading branch information
GatsbyJS Bot and ascorbic authored Dec 7, 2020
1 parent e16f2b5 commit e29866a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/gatsby/cache-dir/api-ssr-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* rendering.
* @param {object} $0
* @param {string} $0.pathname The pathname of the page currently being rendered.
* @param {ReactNode} $0.bodyComponent The React element to be rendered as the page body
* @param {function} $0.replaceBodyHTMLString Call this with the HTML string
* you render. **WARNING** if multiple plugins implement this API it's the
* last plugin that "wins". TODO implement an automated warning against this.
Expand Down
3 changes: 2 additions & 1 deletion packages/gatsby/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,7 @@ export interface RenderBodyArgs extends NodePluginArgs {

export interface ReplaceRendererArgs extends NodePluginArgs {
replaceBodyHTMLString: (str: string) => void
bodyComponent: React.ReactNode
setHeadComponents: (comp: React.ReactNode[]) => void
setHtmlAttributes: (attr: ReactProps<HTMLHtmlElement>) => void
setBodyAttributes: (attr: ReactProps<HTMLBodyElement>) => void
Expand Down Expand Up @@ -1285,7 +1286,7 @@ export interface Actions {
traceId?: string
): void

printTypeDefinitions (
printTypeDefinitions(
path?: string,
include?: { types?: Array<string>; plugins?: Array<string> },
exclude?: { types?: Array<string>; plugins?: Array<string> },
Expand Down

0 comments on commit e29866a

Please sign in to comment.