How to use the @mapbox/batfish/modules/with-location.withLocation function in @mapbox/batfish

To help you get started, we’ve selected a few @mapbox/batfish examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mapbox / dr-ui / demo / src / components / page-shell.js View on Github external
}

PageShell.propTypes = {
  meta: PropTypes.object,
  frontMatter: PropTypes.shape({
    title: PropTypes.string.isRequired,
    description: PropTypes.string.isRequired
  }).isRequired,
  children: PropTypes.node.isRequired,
  // From withLocation
  location: PropTypes.shape({
    pathname: PropTypes.string.isRequired
  }).isRequired
};

export default withLocation(PageShell);
github mapbox / batfish / examples / initial-experiments / src / pages / index.js View on Github external
<a href="{post.path}">
                  {post.frontMatter.title}
                </a>
              
            );
          })}
        
        <div style="{{">
          Horse names: {horseNames.join(', ')}
        </div>
      
    );
  }
}

export default withLocation(Home);
github mapbox / mapbox-gl-js / docs / components / page_shell.js View on Github external
&gt;
                        <div>
                            {this.props.children}
                        </div>
                        {activeTab !== 'overview' ? <div>
                            
                        </div> : ''}
                    
                
            
        );
    }
}

export default withLocation(PageShell);