Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
Deleted unused logs
Browse files Browse the repository at this point in the history
  • Loading branch information
maxschwinghammer committed Jun 12, 2024
1 parent 7487527 commit 4de7dba
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 14 deletions.
4 changes: 1 addition & 3 deletions src/main/web/src/organisms/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ const Login: React.FC<Props> = () => {
<GoogleLogin size={'medium'} logo_alignment={'center'} ux_mode={'popup'} useOneTap={true}
text={"continue_with"}
onSuccess={handleGoogleLogin}
onError={(): void => {
console.log('Login Failed');
}}
onError={(): void => {console.error('Login Failed');}}
/>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/main/web/src/organisms/share/Share.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const Share = (props: ShareProps) => {
};

const openWindowsShareOptions = (): void => {
sharePost().then(() => console.log('Shared ' + type + ' successfully.'));
sharePost();
};

return (
Expand Down
3 changes: 1 addition & 2 deletions src/main/web/src/organisms/signup/EmailInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export const EmailInput = forwardRef<HTMLDivElement, { onSuccess: () => void }>(
};

const handleGoogleLogin = (credentialResponse: CredentialResponse) => {
console.log(credentialResponse);
googleLogin(JSON.stringify({ token: credentialResponse.credential })).then(
(): void => {
localStorage.setItem('oAuthUser', 'true');
Expand Down Expand Up @@ -157,7 +156,7 @@ export const EmailInput = forwardRef<HTMLDivElement, { onSuccess: () => void }>(
text={"signup_with"}
onSuccess={handleGoogleLogin}
onError={(): void => {
console.log("Login Failed");
console.error("Login Failed");
}}
/>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/main/web/src/scenes/Home/components/post/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ export const Post: React.FC<PostModel> = (props: PostModel) => {
headers: headersWithJwt
});
if (response.ok) {
console.log('Post has been saved!');
alert('Post has been saved!');
} else {
console.error('Error saving the post: ', response.statusText);
Expand Down
1 change: 0 additions & 1 deletion src/main/web/src/scenes/Post/PostDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export const PostDetail: React.FC<PostDetailModel> = (props: PostDetailModel) =>
headers: headersWithJwt
});
if (response.ok) {
console.log('Post has been saved!');
alert('Post has been saved!');
} else {
console.error('Error saving the post: ', response.statusText);
Expand Down
4 changes: 2 additions & 2 deletions src/main/web/src/scenes/Post/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ export const Post = () => {
const newComment = await response.json();
setComments(prevComments => [...prevComments, newComment]);
} else {
console.error("Failed to create the comment: ");
console.log(response);
console.error("Failed to create the comment");
console.error("Response:", response);
}
setLoading(false);
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/web/src/services/LikeService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ export const handleLike = async (
const response: Response = await fetch(config.apiUrl + endpoint, requestOptions);

if (!response.ok) {
console.log("Response:", response);
console.error(`Failed to ${userLiked ? 'unlike' : 'like'} ${type}: ${response.statusText}`);
console.error("Response: ", response);
} else {
if (!userLiked) {
setLikes(likes + 1);
Expand Down
4 changes: 1 addition & 3 deletions src/main/web/src/services/ReportService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,14 @@ export const sendReportToBackend = (reportReason: string, reportDescription: str
type: type
};

console.log('Report:', JSON.stringify(report));

fetch(config.apiUrl + 'post/report', {
method: 'POST',
headers: headersWithJwt,
body: JSON.stringify(report),
})
.then(response => {
if (!response.ok) {
console.log(response);
console.error("Response: ", response);
throw new Error('Error sending report: ' + response.statusText);
}
alert('Report of ' + type + ' ' + postId + ' sent successfully');
Expand Down

0 comments on commit 4de7dba

Please sign in to comment.