Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby-plugin-gatsby-cloud): Add disablePreviewUI option #32907

Merged
merged 2 commits into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
updated access to the pluginOptions property and added the disabledPr…
…eivew property to the schema
  • Loading branch information
Leithon Englidh authored and Leithon Englidh committed Aug 26, 2021
commit aa96c3f41fda580de16b8fb3fb4885138775978f
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-gatsby-cloud/src/gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const ShadowPortal = ({ children, identifier }) => {
export const wrapRootElement = ({ element }, pluginOptions) => {
if (
process.env.GATSBY_PREVIEW_INDICATOR_ENABLED === `true` &&
!pluginOptions.disablePreviewUI
!pluginOptions?.disablePreviewUI
) {
return (
<>
Expand Down
3 changes: 3 additions & 0 deletions packages/gatsby-plugin-gatsby-cloud/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ const pluginOptionsSchema = function ({ Joi }) {
generateMatchPathRewrites: Joi.boolean().description(
`When set to false, turns off automatic creation of redirect rules for client only paths`
),
disablePreviewUI: Joi.boolean().description(
`When set to true, turns off Gatsby Preview if enabled`
),
})
}

Expand Down