forked from getsentry/sentry-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgatsby-browser.tsx
More file actions
19 lines (16 loc) · 771 Bytes
/
gatsby-browser.tsx
File metadata and controls
19 lines (16 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import React from 'react';
import {GatsbyBrowser} from 'gatsby';
import {FeedbackWidgetLoader} from 'sentry-docs/components/feedback/feedbackWidgetLoader';
import PageContext from 'sentry-docs/components/pageContext';
export const wrapPageElement: GatsbyBrowser['wrapPageElement'] = ({
element,
props: {pageContext},
}) => <PageContext.Provider value={pageContext}>
<FeedbackWidgetLoader />
{element}
</PageContext.Provider>
// Disable prefetching altogether so our bw is not destroyed.
// If this turns out to hurt performance significantly, we can
// try out https://www.npmjs.com/package/gatsby-plugin-guess-js
// with data from the prior 1-2 weeks.
export const disableCorePrefetching: GatsbyBrowser['disableCorePrefetching'] = () => true;