chore: fix old typo
continuous-integration/drone/push Build is passing Details

main
Antonio De Lucreziis 4 months ago
parent 0784a3512d
commit 125b7d925e

Binary file not shown.

@ -11,20 +11,15 @@ import semesterData from './semester-data.json'
// MODE_SCHEDULE, // MODE_SCHEDULE,
// } from './components/EventsView.jsx' // } from './components/EventsView.jsx'
import { Courses } from './components/view/Courses.jsx'
import { Schedule } from './components/view/Schedule.jsx'
import { HamburgerMenu } from './components/HamburgerMenu.jsx' import { HamburgerMenu } from './components/HamburgerMenu.jsx'
import { Help } from './components/Help.jsx' import { Help } from './components/Help.jsx'
import { Icon } from './components/Icon.jsx' import { Icon } from './components/Icon.jsx'
import { OptionBar } from './components/OptionBar.jsx'
import { Popup } from './components/Popup.jsx' import { Popup } from './components/Popup.jsx'
import { Toolbar } from './components/Toolbar.jsx' import { Toolbar } from './components/Toolbar.jsx'
import { OptionBar } from './components/OptionBar.jsx' import { Courses } from './components/view/Courses.jsx'
import { import { Schedule } from './components/view/Schedule.jsx'
prettyAulaName, import { prettyAulaName, prettyProfName, usePersistentState } from './utils.jsx'
prettyProfName,
clearOldPersistentStates,
usePersistentState,
} from './utils.jsx'
import { SettingsBar } from './components/SettingsBar.jsx' import { SettingsBar } from './components/SettingsBar.jsx'
@ -50,6 +45,8 @@ const TIMETABLE_IDS = semesterData.timetableIds
function specialEventPatches(eventi) { function specialEventPatches(eventi) {
// Il laboratorio del primo anno in realtà è in due gruppi separati // Il laboratorio del primo anno in realtà è in due gruppi separati
eventi.forEach(evento => { eventi.forEach(evento => {
console.log(evento.id, evento.nome, evento.dataInizio, evento.dataFine)
if ( if (
evento.nome === 'LABORATORIO DI INTRODUZIONE ALLA MATEMATICA COMPUTAZIONALE' evento.nome === 'LABORATORIO DI INTRODUZIONE ALLA MATEMATICA COMPUTAZIONALE'
) { ) {
@ -113,7 +110,7 @@ async function loadCalendari(date) {
method: 'POST', method: 'POST',
mode: 'cors', mode: 'cors',
credentials: 'omit', credentials: 'omit',
} },
) )
return await req.json() return await req.json()
@ -127,9 +124,9 @@ async function loadCalendari(date) {
] ]
const results = await Promise.all(requests) const results = await Promise.all(requests)
const timetablesRaw = results.map(timetable => const timetablesRaw = results.map(timetable =>
specialEventPatches(_.uniqBy(timetable, 'id')) specialEventPatches(_.uniqBy(timetable, 'id')),
) )
const allRaw = specialEventPatches(_.concat(...results), 'id') const allRaw = _.uniqBy(specialEventPatches(_.concat(...results)), 'id')
return { return {
'anno-1': formatEvents(timetablesRaw[0]), 'anno-1': formatEvents(timetablesRaw[0]),
@ -194,7 +191,7 @@ const App = ({}) => {
const [theme, setTheme] = usePersistentState( const [theme, setTheme] = usePersistentState(
'theme', 'theme',
'light' 'light',
// window.matchMedia('(prefers-color-scheme: dark)').matches // window.matchMedia('(prefers-color-scheme: dark)').matches
// ? 'dark' // ? 'dark'
// : 'light' // : 'light'

Loading…
Cancel
Save