Skip to content

Commit

Permalink
[docs] Fix warning and crash in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Apr 20, 2020
1 parent 72a477f commit 71f9f5e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/pages/components/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const requireRaw = require.context(
/\.(js|md|tsx)$/,
);

// Run styled-components ref logic
// https://github.com/styled-components/styled-components/pull/2998
requireDemo.keys().map(requireDemo);

// eslint-disable-next-line react/prop-types
export default function Page({ demos, docs }) {
return <MarkdownDocs demos={demos} docs={docs} requireDemo={requireDemo} />;
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/guides/interoperability.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const requireRaw = require.context(
/\.(js|md|tsx)$/,
);

// Run styled-components ref logic
// https://github.com/styled-components/styled-components/pull/2998
requireDemo.keys().map(requireDemo);

// eslint-disable-next-line react/prop-types
export default function Page({ demos, docs }) {
return <MarkdownDocs demos={demos} docs={docs} requireDemo={requireDemo} />;
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/styles/advanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const requireRaw = require.context(
/\.(js|md|tsx)$/,
);

// Run styled-components ref logic
// https://github.com/styled-components/styled-components/pull/2998
requireDemo.keys().map(requireDemo);

// eslint-disable-next-line react/prop-types
export default function Page({ demos, docs }) {
return <MarkdownDocs demos={demos} docs={docs} requireDemo={requireDemo} />;
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/system/basics.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const requireRaw = require.context(
/\.(js|md|tsx)$/,
);

// Run styled-components ref logic
// https://github.com/styled-components/styled-components/pull/2998
requireDemo.keys().map(requireDemo);

// eslint-disable-next-line react/prop-types
export default function Page({ demos, docs }) {
return <MarkdownDocs demos={demos} docs={docs} requireDemo={requireDemo} />;
Expand Down

0 comments on commit 71f9f5e

Please sign in to comment.