mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-14 00:19:16 +01:00
Revert "fix: remove node-fetch and SSR to fix the build"
This reverts commit e106943e4b
.
This commit is contained in:
parent
e106943e4b
commit
fd0b5fd6e4
@ -2,6 +2,7 @@ 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,11 +11,17 @@ 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);
|
||||
|
Loading…
Reference in New Issue
Block a user