Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit Kumbhar committed Jan 18, 2025
1 parent 9ea4bb7 commit 82c08dc
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/components/settings/Datasets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const Datasets = () => {
</Text>
),
labels: { confirm: 'Confirm', cancel: 'Cancel' },
onCancel: () => console.log('Cancel'),
onCancel: () => {},
onConfirm: () => {
loadCities().then((results) => {
notifications.show({
Expand All @@ -42,7 +42,7 @@ export const Datasets = () => {
<Text size="sm">This action will load airport information into your database and will take a long time.</Text>
),
labels: { confirm: 'Confirm', cancel: 'Cancel' },
onCancel: () => console.log('Cancel'),
onCancel: () => {},
onConfirm: () => {
loadAirports().then((results) => {
notifications.show({
Expand Down
2 changes: 1 addition & 1 deletion src/components/trip/activities/GenericActivityData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const GenericActivityData = ({
confirm: t('delete', 'Delete'),
cancel: t('cancel', 'Cancel'),
},
onCancel: () => console.log('Cancel'),
onCancel: () => {},
onConfirm: () => {
deleteActivity(activity.id).then(() => {
notifications.show({
Expand Down
2 changes: 1 addition & 1 deletion src/components/trip/attachments/Attachments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const Attachments = ({
confirm: t('delete', 'Delete'),
cancel: t('cancel', 'Cancel'),
},
onCancel: () => console.log('Cancel'),
onCancel: () => {},
onConfirm: () => {
onDelete(attachmentName).then(() => {
notifications.show({
Expand Down
2 changes: 1 addition & 1 deletion src/components/trip/basic/Collaborators.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const CollaboratorButton = forwardRef<HTMLDivElement, { trip: Trip; user: User;
confirm: t('delete', 'Delete'),
cancel: t('cancel', 'Cancel'),
},
onCancel: () => console.log('Cancel'),
onCancel: () => {},
onConfirm: () => {
deleteCollaborator(trip.id, user.id).then(() => {
onSave();
Expand Down
2 changes: 1 addition & 1 deletion src/components/trip/basic/DestinationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const DestinationCard = ({ destination }: { destination: Destination; tri
if (destination.timezone) {
setTimezoneDiff(calculateTimezoneDifference(destination.timezone));
}
}, [user]);
}, [user, calculateTimezoneDifference]);

return (
<Card withBorder radius="xs" className={classes.card} p={'xs'}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/trip/itinerary/ItineraryView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const ItineraryView = ({ trip }: { trip: Trip }) => {

const weeks = chunk(days, 7);
setTripWeeks(weeks);
}, [activities, lodgings, transportations]);
}, [activities, lodgings, transportations, trip]);

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/components/trip/lodging/GenericLodgingData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const GenericLodgingData = ({
confirm: t('delete', 'Delete'),
cancel: t('cancel', 'Cancel'),
},
onCancel: () => console.log('Cancel'),
onCancel: () => {},
onConfirm: () => {
deleteLodging(lodging.id).then(() => {
notifications.show({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const GenericTransportationData = ({
confirm: t('delete', 'Delete'),
cancel: t('cancel', 'Cancel'),
},
onCancel: () => console.log('Cancel'),
onCancel: () => {},
onConfirm: () => {
deleteTransportation(transportation.id).then(() => {
notifications.show({
Expand Down
1 change: 0 additions & 1 deletion src/lib/pocketbase/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ export const updateSmtpSettings = (settings: SmtpSettings) => {

export const sendTestEmail = () => {
const email = pbAdmin.authStore.record?.email;
console.log('memail, emai', email);
return pbAdmin.settings.testEmail('_superusers', email, 'verification');
};
3 changes: 1 addition & 2 deletions src/pages/trips/MyTrips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ export const MyTrips = () => {

const logError = (error: Error, info: ErrorInfo) => {
// Do something with the error, e.g. log to an external API
console.log(error);
console.log(' info', info);
console.log(error, info);
};

const cards = () => {
Expand Down

0 comments on commit 82c08dc

Please sign in to comment.