diff --git a/components/pages/calendar/EventCalendar.tsx b/components/pages/calendar/EventCalendar.tsx index c5735ab..8ad1fbc 100644 --- a/components/pages/calendar/EventCalendar.tsx +++ b/components/pages/calendar/EventCalendar.tsx @@ -15,6 +15,8 @@ import {CalendarEvent} from "@/components/pages/calendar/interfaces"; interface EventCalendarProps { calendarHeight: number; + // WAS USED FOR SCROLLABLE CALENDARS, PERFORMANCE WAS NOT OPTIMAL + calendarWidth: number; } const getTotalMinutes = () => { @@ -95,8 +97,6 @@ export const EventCalendar: React.FC = React.memo(({calendar ); } - console.log(offsetMinutes) - return ( { const [calendarHeight, setCalendarHeight] = useState(0); + const [calendarWidth, setCalendarWidth] = useState(0); const calendarContainerRef = useRef(null); const onLayout = (event: LayoutChangeEvent) => { - const {height} = event.nativeEvent.layout; + const {height, width} = event.nativeEvent.layout; setCalendarHeight(height); + setCalendarWidth(width); }; return ( @@ -28,6 +30,7 @@ export const InnerCalendar = () => { {calendarHeight > 0 && ( )}