Skip to content

Commit

Permalink
removed unnecessary console statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishim12 committed Dec 26, 2024
1 parent 022d334 commit 1a7f79e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions ubyssey/static_src/src/js/components/Events/calendar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ function useQuery() {
try {
return new URLSearchParams(search || "");
} catch (error) {
console.error("Failed to parse query params:", error);
return new URLSearchParams(); // Return an empty URLSearchParams object on failure
}
}, [search]);
Expand Down Expand Up @@ -108,7 +107,6 @@ export function QueryEventsCalendar() {
const year = parseInt(urlParams.get("year"));
return getDate(month, year);
} else{
console.log("No month and year");
const today = new Date();
today.setHours(0, 0, 0, 0);

Expand All @@ -124,7 +122,6 @@ export function QueryEventsCalendar() {
let newStart = new Date(start);

// Adjust the month based on the direction
console.log(direction);
if (direction === 'next') {
newStart = new Date(newStart.getTime() + (40*d));
} else {
Expand All @@ -146,10 +143,8 @@ export function QueryEventsCalendar() {
// Function to update the start date to the week of the first day of the previous or next month
const handleMonthNavigation = (direction) => {

console.log("Handling month navigation");
let newStart, newMonth, newYear;
newStart = calculateNewStart(direction, start);
console.log("Handling month navigation");
newMonth = newStart.month;
newYear = newStart.year;

Expand All @@ -159,7 +154,6 @@ export function QueryEventsCalendar() {
window.history.pushState(null, '', `?${searchParams.toString()}`);

// Set the new start date and other logic
console.log("Navigating to", newMonth, newYear);
let newStartDate = new Date(newYear, newMonth - 1, 1); // Month is 0-indexed

if (
Expand Down Expand Up @@ -788,7 +782,6 @@ function EventsCalendar({events, start, setStart, numberOfWeeks, setNumberOfWeek
const loaderWeek = Math.floor((numberOfWeeks - 1) / 2);
const isMiddleDay = !isPhablet? week_index === loaderWeek && day_index === Math.floor(week.days.length / 2)
: week_index === 0 && day_index === 0;
console.log(isMiddleDay);
return (
<div key={day_index} className={"day " + day.phase}>
{isMiddleDay && isLoading && !isPhablet &&
Expand Down

0 comments on commit 1a7f79e

Please sign in to comment.