forked from reactjs/react.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgatsby-browser.js
More file actions
29 lines (23 loc) · 761 Bytes
/
Copy pathgatsby-browser.js
File metadata and controls
29 lines (23 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/
'use strict';
const React = require('react');
const ReactDOM = require('react-dom');
const {BannerContextManager} = require('components/Banner');
// Import global styles
require('normalize.css');
require('./src/css/reset.css');
require('./src/prism-styles');
require('./src/css/algolia.css');
// Expose React and ReactDOM as globals for console playground
window.React = React;
window.ReactDOM = ReactDOM;
// A stub function is needed because gatsby won't load this file otherwise
// (https://github.com/gatsbyjs/gatsby/issues/6759)
exports.onClientEntry = () => {};
exports.wrapRootElement = ({element}) => (
<BannerContextManager>{element}</BannerContextManager>
);