diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a913da8..415474e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -183,6 +183,7 @@ jobs: REACT_APP_AMPLITUDE_ID: 123 with: config: chromeWebSecurity=false + install-command: yarn install --silent start: | yarn start yarn start:withAuth diff --git a/website/package.json b/website/package.json index ee9afc2d..4d450fd1 100644 --- a/website/package.json +++ b/website/package.json @@ -49,7 +49,7 @@ }, "devDependencies": { "concurrently": "^6.4.0", - "cypress": "^9.0.0", + "cypress": "8.5.0", "cypress-localstorage-commands": "^1.6.1", "start-server-and-test": "^1.13.1" } diff --git a/website/src/theme/DocPage/index.js b/website/src/theme/DocPage/index.js index eaa6b371..d70ff2fd 100644 --- a/website/src/theme/DocPage/index.js +++ b/website/src/theme/DocPage/index.js @@ -19,6 +19,7 @@ import clsx from 'clsx'; import styles from './styles.module.css'; import {ThemeClassNames, docVersionSearchTag} from '@docusaurus/theme-common'; import DocPageCustom from "../../components/DocPageCustom" +import amplitude from 'amplitude-js'; function DocPageContent({currentDocRoute, versionMetadata, children}) { const {pluginId, version} = versionMetadata; @@ -138,7 +139,6 @@ function DocPage(props) { ); useEffect(() => { - import('amplitude-js').then(amplitude => { if (userAccessStatus?.login) { var amplitudeInstance = amplitude.getInstance().init(process.env.REACT_APP_AMPLITUDE_ID, userAccessStatus?.login.toLowerCase(), { apiEndpoint: `${window.location.hostname}/t` @@ -149,7 +149,6 @@ function DocPage(props) { window.hj("identify", userAccessStatus?.login.toLowerCase(), {}); } } - }) }, [location.pathname, userAccessStatus]) if (process.env.OAUTH_ENABLE == 'true' && userAccessStatus?.permission !== true) {