Skip to content

Commit

Permalink
fix: remove node-fetch and SSR to fix the build
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheartman committed Mar 2, 2022
1 parent 0ce5e54 commit e106943
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions website/src/theme/Root.tsx
Expand Up @@ -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 }) {
Expand All @@ -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);
Expand Down

0 comments on commit e106943

Please sign in to comment.