Skip to content

Commit

Permalink
Fixes tl-its-umich-edu#1580 use new GoogleAnalytics react package, up…
Browse files Browse the repository at this point in the history
…grade react, react-dom
  • Loading branch information
jaydonkrooss committed Jul 31, 2024
1 parent 244815c commit a2036ca
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 60 deletions.
29 changes: 0 additions & 29 deletions assets/src/components/GoogleAnalyticsTracking.js

This file was deleted.

4 changes: 2 additions & 2 deletions assets/src/containers/App.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import React from 'react'
import { Route, Routes, useMatch } from 'react-router-dom'
import GoogleAnalyticsTracking from '../components/GoogleAnalyticsTracking'
import CourseList from './CourseList'
import Course from './Course'
import WarningBanner from '../components/WarningBanner'
import AlertBanner from '../components/AlertBanner'
import { Helmet } from 'react-helmet'
import useGoogleAnalytics from 'react-ga-onetrust-consent'

function App (props) {
const { user, gaId, cspNonce } = props
useGoogleAnalytics({ googleAnalyticsId: gaId, nonce: cspNonce })

if (!user.isLoggedIn) {
if (user.loginURL === '') {
Expand All @@ -21,7 +22,6 @@ function App (props) {
return (
<>
<Helmet titleTemplate='%s | My Learning Analytics' title='Courses' />
<GoogleAnalyticsTracking {...{ gaId, cspNonce }} />
<Routes>
<Route path='/' element={<CourseList user={user} />} />
<Route path='/courses' element={<CourseList user={user} />} />
Expand Down
64 changes: 38 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
"lodash.debounce": "4.0.8",
"lodash.isequal": "4.5.0",
"rc-slider": "10.5.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-ga-onetrust-consent": "github:tl-its-umich-edu/react-ga-onetrust-consent",
"react-ga4": "2.1.0",
"react-helmet": "6.1.0",
"react-router-dom": "6.21.1"
"react-router-dom": "6.25.1"
},
"babel": {
"presets": [
Expand Down

0 comments on commit a2036ca

Please sign in to comment.