Skip to content

Commit

Permalink
fix: sonarqube issues
Browse files Browse the repository at this point in the history
- fixed various issues spotted by sonarqube
  • Loading branch information
cgawron committed Oct 7, 2024
1 parent ee50d47 commit 3ebe2a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions client/src/pages/Booking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const Booking = (props: any) => {
const [activeStep, setActiveStep] = React.useState(0);
const [skipped, setSkipped] = React.useState(new Set());
const [event, setEvent] = useState<Event>(EMPTY_EVENT);
const [selectedDate, setDate] = useState<Date>();
const [selectedDate, setSelectedDate] = useState<Date>();
const [beginDate] = useState<Date>(new Date());
const [slots, setSlots] = useState<IntervalSet>();
const [selectedTime, setSelectedTime] = useState<Date>();
Expand Down Expand Up @@ -185,7 +185,7 @@ const Booking = (props: any) => {

const handleDateChange = (newValue: Date) => {
console.log("change date: %o", startOfDay(newValue));
setDate(newValue);
setSelectedDate(newValue);
setActiveStep(1);
};

Expand Down
1 change: 0 additions & 1 deletion client/src/pages/CalendarInt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ const Calendarintegration = () => {
updateUser(token, user)
.then((user) => {
console.log("updated user: %o", user);
//toast.info("using primary calendars by default");
})
.catch((err) => {
console.error("user update failed: %o", err);
Expand Down
3 changes: 1 addition & 2 deletions common/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { toZonedTime, fromZonedTime } from "date-fns-tz"
import { th } from "date-fns/locale";
import { fromZonedTime } from "date-fns-tz"

/** Enum type representing a day of week.
* The ordering is compatible with the native `Date.prototype.getDay()`, which uses 0 for Sunday.
Expand Down

0 comments on commit 3ebe2a5

Please sign in to comment.