import * as React from "react"; import { getToolbarSrc } from "@prismicio/client"; import type { RenderBodyArgs } from "gatsby"; import type { PluginOptions } from "../types"; export const onRenderBody = ( args: RenderBodyArgs, options: PluginOptions, ): void => { const toolbarURL = new URL(getToolbarSrc(options.repositoryName)); args.setHeadComponents([ , , ]); // TODO: Maybe utilize the new Script component if the Gatsby version // supports it. args.setPostBodyComponents([