1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: remove node-fetch and SSR to fix the build

This commit is contained in:
Thomas Heartman 2022-03-02 13:50:08 +01:00
parent 0ce5e54b66
commit e106943e4b

View File

@ -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 }) {
@ -11,17 +10,11 @@ function Root({ children }) {
} = 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);