Skip to content

Commit 781151a

Browse files
committed
time table - config store used non-proxy elements
1 parent 5a5e49f commit 781151a

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

library/src/components/timetable/TimeTableConfigStore.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ export function useTTCDates(ident: string) {
234234
*/
235235
export function useTTCTimeFrameOfDay(ident: string) {
236236
const timeFrameOfDay = useSnapshot(
237-
timeTableConfigStore[ident].basicProperties.timeFrameDay,
238-
)
237+
timeTableConfigStore[ident].basicProperties,
238+
).timeFrameDay
239239
return timeFrameOfDay
240240
}
241241

@@ -244,17 +244,18 @@ export function useTTCTimeFrameOfDay(ident: string) {
244244
*/
245245
export function useTTCSlotsArray(ident: string) {
246246
const slotsArray = useSnapshot(
247-
timeTableConfigStore[ident].basicProperties.slotsArray,
248-
)
247+
timeTableConfigStore[ident].basicProperties,
248+
).slotsArray
249249
return slotsArray
250250
}
251251

252252
/**
253253
* returns the time slot minutes and a setter for it
254254
*/
255255
export function useTTCTimeSlotMinutes(ident: string) {
256-
const timeSlotMinutes = useSnapshot(timeTableConfigStore[ident])
257-
.basicProperties.timeSlotMinutes
256+
const timeSlotMinutes = useSnapshot(
257+
timeTableConfigStore[ident].basicProperties,
258+
).timeSlotMinutes
258259
return timeSlotMinutes
259260
}
260261

library/src/components/timetable/TimeTableSelectionStore.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,10 @@ export function clearTimeSlotSelection(
219219
) {
220220
const store = timeTableSelectionStore[ident]
221221
if (!store) {
222-
throw new Error(
222+
return
223+
/*throw new Error(
223224
`TimeTable - no time table selection store to clear found for ident: ${ident}`,
224-
)
225+
)*/
225226
}
226227
store.selection.selectedTimeSlots = null
227228
store.selection.groupId = null

package-lock.json

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@
107107
"react-syntax-highlighter": "^15.5.0",
108108
"react-toastify": "^10.0.5",
109109
"react-transition-group": "^4.4.5",
110-
"use-resize-observer": "^9.1.0",
111-
"valtio": "^2.0.0"
110+
"use-resize-observer": "^9.1.0"
112111
},
113112
"devDependencies": {
114113
"@atlaskit/atlassian-navigation": "^4.7.0",
@@ -171,6 +170,7 @@
171170
"react": "^18.3.1",
172171
"react-dom": "^18.3.1",
173172
"react-hook-form": "^7.53.0",
174-
"tailwindcss": "^3.4.7"
173+
"tailwindcss": "^3.4.7",
174+
"valtio": "^2.0.0"
175175
}
176176
}

0 commit comments

Comments
 (0)