Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade/frontend #926

Draft
wants to merge 5 commits into
base: pre-STAG
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions frontend/.babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const plugins = [
[
'babel-plugin-import',
{
libraryName: '@material-ui/core',
libraryName: '@mui/material',
// Use "'libraryDirectory': ''," if your bundler does not support ES modules
libraryDirectory: 'esm',
camel2DashComponentName: false,
Expand All @@ -12,7 +12,7 @@ const plugins = [
[
'babel-plugin-import',
{
libraryName: '@material-ui/icons',
libraryName: '@mui/icons-material',
// Use "'libraryDirectory': ''," if your bundler does not support ES modules
libraryDirectory: 'esm',
camel2DashComponentName: false,
Expand Down
39,669 changes: 22,545 additions & 17,124 deletions frontend/package-lock.json

Large diffs are not rendered by default.

82 changes: 39 additions & 43 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,30 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@apollo/client": "^3.3.11",
"@apollo/client": "^3.10.5",
"@cmdnio/react-qr-reader": "^3.0.2",
"@emotion/styled": "^11.11.5",
"@fortawesome/fontawesome-svg-core": "^1.2.30",
"@fortawesome/free-brands-svg-icons": "^5.14.0",
"@fortawesome/free-solid-svg-icons": "^5.14.0",
"@fortawesome/react-fontawesome": "^0.1.11",
"@hackjunction/shared": "file:../shared",
"@material-ui/core": "^4.10.1",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.55",
"@mui/x-data-grid": "^4.0.2",
"@react-pdf/renderer": "^2.0.0-beta.6",
"@mui/icons-material": "next",
"@mui/lab": "next",
"@mui/material": "next",
"@mui/x-data-grid": "^7.7.0",
"@react-pdf/renderer": "^3.4.4",
"@redux-devtools/extension": "^3.3.0",
"@welldone-software/why-did-you-render": "^4.2.5",
"antd": "^4.3.1",
"antd": "^5.18.3",
"auth0-js": "^9.13.2",
"axios": "^0.28.0",
"babel-plugin-import": "^1.13.0",
"cloudinary-react": "^1.5.0",
"connected-react-router": "^6.8.0",
"downloadjs": "^1.4.7",
"export-to-csv": "^0.2.1",
"formik": "^2.1.4",
"framer-motion": "^1.11.0",
"framer-motion": "^11.2.11",
"graphql": "^15.0.0",
"graphql-ws": "^5.9.1",
"i18next": "^19.4.5",
Expand All @@ -34,41 +36,36 @@
"logrocket": "^1.0.7",
"moment": "^2.26.0",
"moment-timezone": "^0.5.31",
"notistack": "^0.9.16",
"notistack": "^3.0.1",
"object-path": "^0.11.8",
"pdf-lib": "^1.17.1",
"qrcode.react": "^1.0.0",
"react": "16.13.1",
"qrcode.react": "^3.1.0",
"react": "18.3.1",
"react-beautiful-dnd": "^13.0.0",
"react-color": "^2.19.3",
"react-cookie-consent": "^6.2.4",
"react-cookie-consent": "^9.0.0",
"react-countdown-now": "^2.1.2",
"react-csv": "^2.0.3",
"react-dom": "^16.13.1",
"react-dom": "^18.3.1",
"react-facebook-pixel": "^1.0.3",
"react-ga": "^2.7.0",
"react-ga": "^3.3.1",
"react-helmet": "^6.1.0",
"react-hyper-modal": "^1.2.11",
"react-i18next": "^11.5.0",
"react-inlinesvg": "^1.2.0",
"react-markdown": "^4.3.1",
"react-inlinesvg": "^4.1.3",
"react-markdown": "^9.0.1",
"react-multi-carousel": "^2.8.4",
"react-player": "^2.6.2",
"react-qr-reader": "^2.2.1",
"react-redux": "^7.2.0",
"react-player": "^2.16.0",
"react-redux": "^9.1.2",
"react-responsive-masonry": "^2.1.7",
"react-router-dom": "^5.2.0",
"react-scripts": "^3.4.3",
"react-select": "^3.1.0",
"react-swipeable-views": "0.13.9",
"react-swipeable-views-utils": "0.13.9",
"react-router-dom": "^6.23.1",
"react-scripts": "^5.0.1",
"react-select": "^5.8.0",
"react-table": "^7.1.0",
"recharts": "^1.8.5",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
"redux-pack": "^0.1.5",
"recharts": "^2.12.7",
"redux": "^5.0.1",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"redux-thunk": "^3.1.0",
"remark-breaks": "^1.0.5",
"reselect": "^4.0.0",
"speakingurl": "^14.0.1",
Expand All @@ -90,23 +87,22 @@
"build:styles": "npm run build:tailwind"
},
"browserslist": [
"defaults",
"not IE 11",
"maintained node versions"
"defaults"
],
"proxy": "http://localhost:2222",
"engines": {
"node": "12.3.1",
"npm": "6.9.0"
"node": "22.2.0",
"npm": "10.8.0"
},
"devDependencies": {
"depcheck": "^0.9.2",
"eslint-config-prettier": "^8.3.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.4.0",
"postcss-cli": "^10.1.0",
"prettier": "^2.3.2"
"babel-eslint": "^10.1.0",
"depcheck": "^1.4.7",
"eslint": "^8",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.1.3",
"postcss-cli": "^11.0.0",
"prettier": "^3.3.2"
}
}
25 changes: 12 additions & 13 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import React, { useState, useEffect, Suspense } from 'react'

import { ConnectedRouter, push } from 'connected-react-router'
import { useDispatch, useSelector } from 'react-redux'
import { ApolloProvider } from '@apollo/client'

import { Route, Redirect, Switch } from 'react-router-dom'
import { Route, Navigate, Routes } from 'react-router-dom'
import routeConfig from './routes'
import apolloClient from './graphql/client'
import config from 'constants/config'
import * as AuthSelectors from 'redux/auth/selectors'
import * as AuthActions from 'redux/auth/actions'
import * as AuthSelectors from 'reducers/auth/selectors'
import * as AuthActions from 'reducers/auth/actions'
import AnalyticsService from 'services/analytics'
import { getCookieConsentValue } from 'react-cookie-consent'
import CookieConsentBar from 'components/layouts/CookieConsentBar'
import * as SnackbarActions from 'redux/snackbar/actions'
import * as SnackbarActions from 'reducers/snackbar/actions'

export default ({ history, location }) => {
export default ({ location }) => {
const dispatch = useDispatch()
const idToken = useSelector(AuthSelectors.getIdToken)
const isAuthenticated = useSelector(AuthSelectors.isAuthenticated)
Expand All @@ -26,12 +25,14 @@ export default ({ history, location }) => {
if (getCookieConsentValue() === 'true') {
AnalyticsService.init()
AnalyticsService.pageView(window.location)
/**
const unlisten = history.listen(AnalyticsService.pageView)
return () => {
unlisten()
}
*/
}
}, [location, history])
}, [location])

useEffect(() => {
setLoading(false)
Expand All @@ -57,10 +58,9 @@ export default ({ history, location }) => {
) /*TODO: fails to fetch when renewing session causing a loop. fix! */
}
>
<ConnectedRouter history={history}>
<Suspense fallback={null}>
{!loading && (
<Switch>
<Routes>
{routeConfig.routes.map(route => (
<Route key={route.path} {...route} />
))}
Expand Down Expand Up @@ -128,12 +128,11 @@ export default ({ history, location }) => {
src="https://platform.twitter.com/widgets.js"
></script>
{/* {isAuthenticated ?
<Redirect to="/dashboard" /> :} */}
<Redirect to="/" />
</Switch>
<Navigate to="/dashboard" /> :} */}
<Navigate to="/" />
</Routes>
)}
</Suspense>
</ConnectedRouter>
<CookieConsentBar />
</ApolloProvider>
)
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/LanguageMenu/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'

import Select from '@material-ui/core/Select'
import MenuItem from '@material-ui/core/MenuItem'
import Select from '@mui/material/Select'
import MenuItem from '@mui/material/MenuItem'

import { useTranslation } from 'react-i18next'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Dialog, Typography } from '@material-ui/core'
import { Dialog, Typography } from '@mui/material'
import Button from 'components/generic/Button'
import Container from 'components/generic/Container'
import PageWrapper from 'components/layouts/PageWrapper'
import React, { useEffect, useState } from 'react'
import Profile from 'components/Participant/Profile'
import { set } from 'react-ga'
import { useDispatch } from 'react-redux'
import * as DashboardActions from 'redux/dashboard/actions'
import * as DashboardActions from 'reducers/dashboard/actions'
import { gradientRandomizer } from 'utils/stylingHelpers'

export default ({ viewMode = 'card', userData = {}, enabledView = false }) => {
Expand Down
Loading