diff --git a/.env.example b/.env.example index 59e03c1..6db0bf5 100644 --- a/.env.example +++ b/.env.example @@ -1 +1,3 @@ -POLLING_INTERVAL=300000 +REACT_APP_POLLING_INTERVAL=300000 +REACT_APP_DOCWHIZZ_TRAEFIK_EE_USER_ID= +REACT_APP_DOCWHIZZ_TRAEFIK_PROXY_USER_ID= diff --git a/src/App.tsx b/src/App.tsx index e7a6826..87a3c88 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,7 +12,7 @@ function App({ product }: { product?: string }) { return ( diff --git a/src/components/nav/useDocWhizzScript.jsx b/src/components/nav/useDocWhizzScript.jsx index 71b5efc..8a230ea 100644 --- a/src/components/nav/useDocWhizzScript.jsx +++ b/src/components/nav/useDocWhizzScript.jsx @@ -5,11 +5,11 @@ const WHITELISTED_HOSTNAME = ['localhost', 'doc.traefik.io'] const useDocWhizzScript = () => { const { pathname, hostname } = window.location const product = pathname.split('/')[1] - +console.log(process.env.REACT_APP_DOCWHIZZ_TRAEFIK_PROXY_USER_ID) const clientId = useMemo(() => { if (WHITELISTED_HOSTNAME.includes(hostname)) { - if (product === 'traefik') return '65e8267d7714e3b11a5ce139' - if (product === 'traefik-enterprise') return '65f0e20984bd4dfcfe7e58a6' + if (product === 'traefik') return process.env.REACT_APP_DOCWHIZZ_TRAEFIK_PROXY_USER_ID + if (product === 'traefik-enterprise') return process.env.REACT_APP_DOCWHIZZ_TRAEFIK_EE_USER_ID return null }