Skip to content

Commit

Permalink
Revert changes for view change
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth committed Feb 4, 2024
1 parent fbbeba8 commit f0b526e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 258 deletions.
2 changes: 1 addition & 1 deletion packages/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
]
},
"dependencies": {
"@aldabil/react-scheduler": "^2.7.8",
"@aldabil/react-scheduler": "^2.6.7",
"@fontsource/roboto": "^4.3.0",
"@fortawesome/fontawesome-svg-core": "^1.2.30",
"@fortawesome/free-solid-svg-icons": "^5.14.0",
Expand Down
8 changes: 1 addition & 7 deletions packages/dashboard/src/components/tasks/task-schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Scheduler } from '@aldabil/react-scheduler';
import { DayProps } from '@aldabil/react-scheduler/views/Day';
import { MonthProps } from '@aldabil/react-scheduler/views/Month';
import { WeekProps } from '@aldabil/react-scheduler/views/Week';
import { View } from '@aldabil/react-scheduler/components/nav/Navigation';
import {
CellRenderedProps,
ProcessedEvent,
Expand Down Expand Up @@ -91,7 +90,6 @@ export const TaskSchedule = () => {
until: undefined,
at: new Date(),
});
const [view, setView] = React.useState<View>('week');

React.useEffect(() => {
const sub = AppEvents.refreshTaskSchedule.subscribe({
Expand Down Expand Up @@ -268,7 +266,7 @@ export const TaskSchedule = () => {
<Scheduler
// react-scheduler does not support refreshing, workaround by mounting a new instance.
key={`scheduler-${refreshTaskScheduleCount}`}
view={view}
view="week"
day={defaultDaySettings}
week={defaultWeekSettings}
month={defaultMonthSettings}
Expand Down Expand Up @@ -296,10 +294,6 @@ export const TaskSchedule = () => {
viewerExtraComponent={(fields, event) => {
return <Typography variant="caption">{event.title}</Typography>;
}}
onViewChange={(view) => {
console.log(view);
setView(view);
}}
/>
{openCreateTaskForm && (
<CreateTaskForm
Expand Down
Loading

0 comments on commit f0b526e

Please sign in to comment.