feat: Disable 3P scripts on Codesandbox #24
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's the purpose of this pull request?
This PR aims to avoid iframe errors on Codesandbox by disabling third-party scripts on it.
How does it work?
It checks if the
DISABLE_3P_SCRIPTS
envvar exists and istrue
. If so, it doesn't render theThirdPartyScripts
component.Checklist
You may erase this after checking them all ;)
Added an entry in the
CHANGELOG.md
at the beginning of its due section. The latest version should comes first.Added the PR number with the PR link at the entry in the
CHANGELOG.md
. E.g., New items in thepull_request_template.md
(#4)PR description
Updated the Storybook - if applicable.
Added a label according to the PR goal -
Breaking change
,Enhancement
,Bug
orChore
.Added the component, hook, or pathname in-between backticks (``) - If applicable. E.g.,
ComponentName
component.Identified the function or parameter in the PR - If applicable. E.g.,
useWindowDimensions
hook.For documentation changes, ping @carolinamenezes or @Mariana-Caetano to review and update the changes.