modules/gatsby/src/utils/example-registry.js
function getHeroExample() {
  const EXAMPLES = getExamples();
  const exampleNames = Object.keys(EXAMPLES);
  let DefaultHeroExample = exampleNames.length && EXAMPLES[0];
  // HACK/ib - Check if this is a dummy example injected to keep graphgl happy
  // Set to null if undefined
  if (!DefaultHeroExample || DefaultHeroExample.title === "none") {
    DefaultHeroExample = null;
  }

  const HeroExample = DefaultHeroExample;
  if (!HeroExample) {
    console.warn("ocular: No hero example found", EXAMPLES); // eslint-disable-line
  }
  return HeroExample;
}
function getHeroExample() {
  const EXAMPLES = getExamples();
  const exampleNames = Object.keys(EXAMPLES);
  let DefaultHeroExample = exampleNames.length && EXAMPLES[0];
  // HACK/ib - Check if this is a dummy example injected to keep graphgl happy
  // Set to null if undefined
  if (!DefaultHeroExample || DefaultHeroExample.title === "none") {
    DefaultHeroExample = null;
  }

  const HeroExample = DefaultHeroExample;
  if (!HeroExample) {
    console.warn("ocular: No hero example found", EXAMPLES); // eslint-disable-line
  }
  return HeroExample;
}
function getHeroExample ( ) { const EXAMPLES = getExamples ( ) ; const exampleNames = Object . keys ( EXAMPLES ) ; let DefaultHeroExample = exampleNames . length && EXAMPLES [ 0 ] ; // HACK/ib - Check if this is a dummy example injected to keep graphgl happy // Set to null if undefined if ( ! DefaultHeroExample || DefaultHeroExample . title === "none" ) { DefaultHeroExample = null ; } const HeroExample = DefaultHeroExample ; if ( ! HeroExample ) { console . warn ( "ocular: No hero example found" , EXAMPLES ) ; // eslint-disable-line } return HeroExample ; }
Get a hero example if provided, or the first of the listed examples
Get a hero example if provided or the first of the listed examples