Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
this.setState({ supported: supported() });
}
render() {
render() {
const {frontMatter} = this.props;
frontMatter.language = ['JavaScript'];
frontMatter.contentType = 'example';
return (
<div>
<div>
<div>
<h1>{frontMatter.title}</h1>
<div>{md(frontMatter.description)}</div>
{!supported() &&
<div id="unsupported">
<div>
<div>Mapbox GL unsupported</div>
<div>Mapbox GL requires <a href="http://caniuse.com/webgl">WebGL support</a>. Please check that you are using a supported browser and that WebGL is <a href="http://get.webgl.org/">enabled</a>.</div>
</div>
</div>}
</div>
{supported() &&
</div></div>
<div>
<div>
<div>
<h1>{frontMatter.title}</h1>
<div>{md(frontMatter.description)}</div>
{!supported() &&
<div id="unsupported">
<div>
<div>Mapbox GL unsupported</div>
<div>Mapbox GL requires <a href="http://caniuse.com/webgl">WebGL support</a>. Please check that you are using a supported browser and that WebGL is <a href="http://get.webgl.org/">enabled</a>.</div>
</div>
</div>}
</div>
{supported() &&
</div></div>