diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 27f1fd685..bd0fef2d4 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, windows-latest] - node-version: [16.x, 17.x, 18.x] + node: [18, 19, 20, 21] runs-on: ${{ matrix.platform }} steps: - name: Clone repository @@ -25,7 +25,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: ${{ env.node-version }} + node-version: ${{ matrix.node }} - name: Install npm dependencies run: npm install diff --git a/package.json b/package.json index da08efaab..d6e40d776 100644 --- a/package.json +++ b/package.json @@ -22,22 +22,22 @@ "test:debug": "react-scripts --inspect-brk test --runInBand" }, "dependencies": { - "@coreui/chartjs": "^3.1.1", + "@coreui/chartjs": "^3.1.2", "@coreui/coreui": "^4.2.6", "@coreui/icons": "^3.0.1", "@coreui/icons-react": "^2.1.0", - "@coreui/react": "^4.6.0", - "@coreui/react-chartjs": "^2.1.2", - "@coreui/utils": "^2.0.1", + "@coreui/react": "^4.9.0-rc.0", + "@coreui/react-chartjs": "^2.1.3", + "@coreui/utils": "^2.0.2", "chart.js": "^3.9.1", "classnames": "^2.3.2", - "core-js": "^3.29.0", + "core-js": "^3.31.0", "prop-types": "^15.8.1", "react": "^18.2.0", "react-app-polyfill": "^3.0.0", "react-dom": "^18.2.0", - "react-redux": "^8.0.5", - "react-router-dom": "^6.8.2", + "react-redux": "^8.1.1", + "react-router-dom": "^6.14.0", "redux": "4.2.1", "simplebar-react": "^2.4.3" }, @@ -45,12 +45,12 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", - "eslint-config-prettier": "^8.7.0", + "eslint-config-prettier": "^8.8.0", "eslint-plugin-prettier": "^4.2.1", - "prettier": "2.8.4", + "prettier": "2.8.8", "react-scripts": "5.0.1", - "sass": "^1.58.3", - "web-vitals": "^3.1.1" + "sass": "^1.63.6", + "web-vitals": "^3.3.2" }, "engines": { "node": ">=10", diff --git a/public/index.html b/public/index.html index b25132580..788eed772 100644 --- a/public/index.html +++ b/public/index.html @@ -2,9 +2,9 @@
@@ -30,9 +30,22 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> + + + diff --git a/src/layout/DefaultLayout.js b/src/layout/DefaultLayout.js index 43bd64432..a7f1cc689 100644 --- a/src/layout/DefaultLayout.js +++ b/src/layout/DefaultLayout.js @@ -1,7 +1,20 @@ -import React from 'react' +import React, { useEffect } from 'react' +import { useLocation } from 'react-router-dom' + import { AppContent, AppSidebar, AppFooter, AppHeader } from '../components/index' const DefaultLayout = () => { + const location = useLocation() + + useEffect(() => { + // Google Tag Manager + window.dataLayer = window.dataLayer || [] + window.dataLayer.push({ + event: 'pageview', + page_location: window.location.href, + }) + }, [location]) + return (