Skip to content

Commit

Permalink
removed all console logs from client
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-ahnaf committed Jan 12, 2025
1 parent a923b66 commit 5baf75b
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 18 deletions.
5 changes: 0 additions & 5 deletions client/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export default class Api {
(response) => response,
async (error) => {
const originalRequest = error.config;
console.log(error);

if (error.response?.status === 401 && !originalRequest._retry) {
originalRequest._retry = true;
Expand Down Expand Up @@ -226,17 +225,13 @@ export default class Api {
}

handleError(error: any) {
console.error(error);
// used for Abort request controllers
if (error.code === 'ERR_CANCELED') {
return this.createReply('ignore', 'Pending request aborted', null);
}

const res: ApiResponse<any> = error?.response?.data;
console.log(res);

if (res) {
console.error(res);
return res;
}

Expand Down
6 changes: 1 addition & 5 deletions client/src/components/Dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, MenuItem, Select, SelectChangeEvent, Skeleton, Typography } from '@mui/material';
import { ReactElement, useEffect } from 'react';
import { ReactElement } from 'react';

interface DropdownProps {
id: string;
Expand Down Expand Up @@ -87,10 +87,6 @@ export default function Dropdown({ sx, id, disabled, value, options, onChange, d
);
};

useEffect(() => {
console.log(id, value, options);
}, []);

const handleChange = (event: SelectChangeEvent) => {
onChange(id, event.target.value);
};
Expand Down
1 change: 0 additions & 1 deletion client/src/helpers/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class ChromeCacheService implements CacheService {

async get(key: CacheItems): Promise<string | null> {
const item = await chrome.storage.sync.get(key);
console.log('token from storage api: ', item[key]);
const data = item[key];

if (!data) {
Expand Down
2 changes: 0 additions & 2 deletions client/src/pages/Home/BookRoomView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ export default function BookRoomView({ onRoomBooked }: BookRoomViewProps) {
const { startTime, duration, seats } = formData;
const { floor } = preferences;

console.log('room fetch', startTime, duration, seats, floor);

const date = new Date(Date.now()).toISOString().split('T')[0];
const formattedStartTime = convertToRFC3339(date, startTime);

Expand Down
2 changes: 0 additions & 2 deletions client/src/pages/Home/MyEventsView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ export default function MyEventsView() {
};

const res = await api.updateEvent(eventId, payload);
console.log(res);

if (res?.redirect) {
toast.error("Couldn't complete request. Redirecting to login page");
setTimeout(() => {
Expand Down
2 changes: 0 additions & 2 deletions client/src/pages/Oauth/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ export default function OAuth() {
}

const res = await api.handleOAuthCallback(code);
console.log('after handleOAuthCallback response', res);

if (res.status === 'error') {
navigate(ROUTES.signIn, { state: { message: res.message || 'Something went wrong' }, replace: true });
return;
Expand Down
1 change: 0 additions & 1 deletion client/src/pages/Settings/PreferenceView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export default function PreferenceView() {

init(floors, capacities);
} catch (error: any) {
console.error('Error loading initial data', error);
renderError(error, navigate);
}
};
Expand Down

0 comments on commit 5baf75b

Please sign in to comment.