diff --git a/website/package.json b/website/package.json index 42c6659de7..2480968541 100644 --- a/website/package.json +++ b/website/package.json @@ -25,7 +25,6 @@ "@svgr/webpack": "6.2.1", "clsx": "1.1.1", "file-loader": "6.2.0", - "node-fetch": "^2.6.7", "react": "17.0.2", "react-dom": "17.0.2", "unleash-proxy-client": "^1.11.0", diff --git a/website/src/theme/Root.tsx b/website/src/theme/Root.tsx index d89436590a..c69cb7cb8d 100644 --- a/website/src/theme/Root.tsx +++ b/website/src/theme/Root.tsx @@ -2,7 +2,6 @@ import React from 'react'; import UserFeedback from '@site/src/components/UserFeedback'; import { UnleashClient } from 'unleash-proxy-client'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import nodeFetch from 'node-fetch' // Default implementation, that you can customize function Root({ children }) { @@ -10,18 +9,11 @@ function Root({ children }) { siteConfig: { customFields }, } = useDocusaurusContext(); - - const unleashSsrOptions = { - disableMetrics: true, - fetch: nodeFetch - } - const unleashConfig = { clientKey: customFields.unleashProxyClientKey as string, url: customFields.unleashProxyUrl as string, disableRefresh: true, appName: `docs.getunleash.io-${customFields.environment}`, - ...(typeof fetch === "undefined" ? unleashSsrOptions : {}) }; const [showFeedback, setShowFeedback] = React.useState(false);