|
|
@ -92,9 +92,6 @@ async function loadCalendari(date) {
|
|
|
|
const saturday = new Date(monday)
|
|
|
|
const saturday = new Date(monday)
|
|
|
|
saturday.setDate(monday.getDate() + 5)
|
|
|
|
saturday.setDate(monday.getDate() + 5)
|
|
|
|
|
|
|
|
|
|
|
|
console.log(monday.toISOString())
|
|
|
|
|
|
|
|
console.log(saturday.toISOString())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async function req(id) {
|
|
|
|
async function req(id) {
|
|
|
|
// Almost directly copy-pasted from Chrome Dev Tools
|
|
|
|
// Almost directly copy-pasted from Chrome Dev Tools
|
|
|
|
const req = await fetch(
|
|
|
|
const req = await fetch(
|
|
|
@ -178,10 +175,7 @@ const App = ({}) => {
|
|
|
|
// Use any random string of your choice
|
|
|
|
// Use any random string of your choice
|
|
|
|
// clearOldPersistentStates('e73cba02')
|
|
|
|
// clearOldPersistentStates('e73cba02')
|
|
|
|
|
|
|
|
|
|
|
|
const [date, setDate] = usePersistentState(
|
|
|
|
const [date, setDate] = useState(new Date().toISOString())
|
|
|
|
'date',
|
|
|
|
|
|
|
|
new Date('2023-10-24').toISOString()
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Data Sources
|
|
|
|
// Data Sources
|
|
|
|
const [view, setView] = usePersistentState('view', 'magistrale')
|
|
|
|
const [view, setView] = usePersistentState('view', 'magistrale')
|
|
|
@ -265,6 +259,22 @@ const App = ({}) => {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
) : timetables['tutti'].length === 0 ? (
|
|
|
|
|
|
|
|
<div class="warning">
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
|
|
Non esistono corsi per la settimana selezionata:
|
|
|
|
|
|
|
|
buone vacanze! 🎉
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
|
|
Per cambiare settimana puoi usare il widget
|
|
|
|
|
|
|
|
Calendario (
|
|
|
|
|
|
|
|
<Icon name="calendar_month" />) in alto a destra
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
|
|
|
In versione mobile, il widget Calendario è
|
|
|
|
|
|
|
|
situato dentro il Menu (
|
|
|
|
|
|
|
|
<Icon name="menu" />)
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
) : (
|
|
|
|
) : (
|
|
|
|
<View
|
|
|
|
<View
|
|
|
|
selection={selectedCourses}
|
|
|
|
selection={selectedCourses}
|
|
|
|