Skip to content

Commit

Permalink
feat: try out shibboleth pinger
Browse files Browse the repository at this point in the history
  • Loading branch information
HRemonen committed Aug 16, 2024
1 parent 6023dc1 commit e7bcf1a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"resize-observer-polyfill": "^1.5.1",
"sequelize": "^6.35.1",
"umzug": "^2.3.0",
"unfuck-spa-shibboleth-session": "^3.1.3",
"unfuck-spa-shibboleth-session": "^4.1.0",
"unfuck-utf8-headers-middleware": "^1.0.1",
"uuid": "^8.3.2",
"vite": "^5.2.10",
Expand Down
12 changes: 7 additions & 5 deletions src/client/pages/App.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import React, { Suspense } from 'react'
import React, { Suspense, useEffect } from 'react'
import { Switch, Route } from 'react-router-dom'
import { SnackbarProvider } from 'notistack'
import { ThemeProvider, StyledEngineProvider } from '@mui/material/styles'
import { CssBaseline } from '@mui/material'

import { useTranslation } from 'react-i18next'
import { initShibbolethPinger } from 'unfuck-spa-shibboleth-session'

import LocalizationProvider from '../components/LocalizationProvider'
import CustomUiConfigProvider from '../components/CustomUiConfigProvider'
import AdUser from './AdUser'
import GuestUser from './GuestUser'
import useTheme from '../theme'
import usePinger from '../hooks/usePinger'
import { inE2EMode, UI_CONFIG_NAME } from '../util/common'
import { UI_CONFIG_NAME } from '../util/common'
import useCustomUiConfig from '../hooks/useCustomUiConfig'

const App = () => {
Expand All @@ -20,7 +20,9 @@ const App = () => {
const customUiConfig: any = useCustomUiConfig(UI_CONFIG_NAME)
const theme = useTheme(customUiConfig?.theme)

usePinger({ enabled: !inE2EMode })
useEffect(() => {
initShibbolethPinger()
}, [])

// Change the document language according to the i18n language
i18n.on('languageChanged', (lng: 'en' | 'fi' | 'sv') => {
Expand Down

0 comments on commit e7bcf1a

Please sign in to comment.