1- import React from " react" ;
2- import { graphql , Link } from " gatsby" ;
3- import Layout from " ../components/Layout" ;
4- import ScannerExamples from " ../components/ScannerExamples.js" ;
1+ import React from ' react' ;
2+ import { graphql , Link } from ' gatsby' ;
3+ import Layout from ' ../components/Layout' ;
4+ import ScannerExamples from ' ../components/ScannerExamples.js' ;
55
6- const Integration = props => {
6+ const Integration = ( props ) => {
77 const { title } = props . data . markdownRemark . frontmatter ;
88 const { html } = props . data . markdownRemark ;
99 const scanner = props . data . scanner . edges ;
1010 const persistenceProvider = props . data . persistenceProvider . edges ;
11+ const showExamples = props . path . includes ( 'scanners' ) ;
1112
1213 return (
1314 < Layout bodyClass = "integration" >
1415 < div className = "sidebar-wrapper" >
1516 < nav className = "sidebar" >
1617 < h1 className = "sidebar-header" > Scanner</ h1 >
1718 < ul className = "list-unstyled components" >
18- { scanner . map ( scanner => (
19+ { scanner . map ( ( scanner ) => (
1920 < li key = { scanner . node . frontmatter . title } >
2021 < Link
2122 to = { `/integrations/${ scanner . node . frontmatter . path } ` }
@@ -28,7 +29,7 @@ const Integration = props => {
2829 </ ul >
2930 < h1 className = "sidebar-header" > Hooks</ h1 >
3031 < ul className = "list-unstyled components" >
31- { persistenceProvider . map ( persistenceProvider => (
32+ { persistenceProvider . map ( ( persistenceProvider ) => (
3233 < li key = { persistenceProvider . node . frontmatter . title } >
3334 < Link
3435 to = { `/integrations/${ persistenceProvider . node . frontmatter . path } ` }
@@ -48,7 +49,7 @@ const Integration = props => {
4849 className = "content"
4950 dangerouslySetInnerHTML = { { __html : html } }
5051 />
51- < ScannerExamples scanner = { props . path } />
52+ { showExamples && < ScannerExamples scanner = { props . path } /> }
5253 </ div >
5354 </ div >
5455 </ div >
0 commit comments