Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

fix(docz): use playground from context (fixes playground shadowing) #1197

Merged
merged 7 commits into from
Oct 24, 2019

Conversation

rakannimer
Copy link
Contributor

Remove docz-components and use Playground provided from gatsby-theme-docz via React Context


return (
<DoczPlayground
<components.playground
Copy link
Contributor

@Kerumen Kerumen Oct 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can create a variable for this no? Makes it a bit clearer:

const components = useComponents()
const PlaygroundComponent = components.playground

Also the first !components is not necessary as there is already a default value here: https://github.com/jesperorb/docz/blob/6eda1289c872f891f58ac6e51c94d66938884294/core/docz/src/hooks/useComponents.tsx#L51

@@ -0,0 +1,10 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it related?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that 👍

@rakannimer rakannimer merged commit e4b4a40 into master Oct 24, 2019
@rakannimer rakannimer deleted the fix-playground-shadowing branch October 24, 2019 14:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants