From 24ea6edffc7acee61d0e12b57c0ac701338a5dc2 Mon Sep 17 00:00:00 2001
From: IceTeaXXD <13521024@std.stei.itb.ac.id>
Date: Thu, 16 Nov 2023 19:43:10 +0700
Subject: [PATCH] chore: remove logs

---
 src/components/Acceptance/Acceptance.tsx      | 24 +++++--------------
 .../Assignment/DeleteAssignmentDialog.tsx     |  3 +--
 src/components/Assignment/Submission.tsx      |  1 -
 src/components/Register/RegisterOrg.tsx       |  1 -
 .../Register/RegisterUniversity.tsx           |  5 ++--
 src/components/Report/Report.tsx              |  1 -
 6 files changed, 9 insertions(+), 26 deletions(-)

diff --git a/src/components/Acceptance/Acceptance.tsx b/src/components/Acceptance/Acceptance.tsx
index d483def..3bd5afe 100644
--- a/src/components/Acceptance/Acceptance.tsx
+++ b/src/components/Acceptance/Acceptance.tsx
@@ -143,18 +143,13 @@ const Acceptance = () => {
     const url = new URL(
       process.env.REACT_APP_API_URL + `/api/scholarship/acceptance/${sid}`
     )
-    console.log(url.toString())
     axiosInstance
       .post(url.toString(), {
         status: "accepted",
         user_id: Number(selectedID)
       })
-      .then(function (response) {
-        console.log(response)
-      })
-      .catch(function (error) {
-        console.log(error)
-      })
+      .then(function (response) {})
+      .catch(function (error) {})
 
     toast({
       title: "Acceptance set",
@@ -171,17 +166,10 @@ const Acceptance = () => {
     const url = new URL(
       process.env.REACT_APP_API_URL + `/api/scholarship/acceptance/${sid}`
     )
-    axiosInstance
-      .post(url.toString(), {
-        status: "rejected",
-        user_id: Number(selectedID)
-      })
-      .then(function (response) {
-        console.log(response)
-      })
-      .catch(function (error) {
-        console.log(error)
-      })
+    axiosInstance.post(url.toString(), {
+      status: "rejected",
+      user_id: Number(selectedID)
+    })
 
     toast({
       title: "Rejection set",
diff --git a/src/components/Assignment/DeleteAssignmentDialog.tsx b/src/components/Assignment/DeleteAssignmentDialog.tsx
index 8ed632f..50f98c1 100644
--- a/src/components/Assignment/DeleteAssignmentDialog.tsx
+++ b/src/components/Assignment/DeleteAssignmentDialog.tsx
@@ -36,8 +36,7 @@ export const DeleteAssignmentDialog: React.FC<DeleteAlertDialogProps> = ({
         scholarship_id +
         "/" +
         assignment_id
-      const response = await axiosInstance.delete(URL)
-      console.log(response)
+      await axiosInstance.delete(URL)
       onClose()
       onDeleteSuccess()
       toast({
diff --git a/src/components/Assignment/Submission.tsx b/src/components/Assignment/Submission.tsx
index 1e98cfe..99d3739 100644
--- a/src/components/Assignment/Submission.tsx
+++ b/src/components/Assignment/Submission.tsx
@@ -31,7 +31,6 @@ export const Submissions = () => {
     const fetchFile = async () => {
       try {
         const response = await axiosInstance.get(FILE_URL)
-        console.log(response.data.data.files)
         setSubmissionFile(response.data.data.files)
 
         const userDetailsPromises = response.data.data.files.map(
diff --git a/src/components/Register/RegisterOrg.tsx b/src/components/Register/RegisterOrg.tsx
index f0ebbe4..6723bae 100644
--- a/src/components/Register/RegisterOrg.tsx
+++ b/src/components/Register/RegisterOrg.tsx
@@ -57,7 +57,6 @@ const RegisterOrg = () => {
   const [errMsg, setErrMsg] = useState("")
 
   const handleSubmit = async (e: any) => {
-    console.log("SUBMIT")
     e.preventDefault()
     // check if there are some empty fields
     if (
diff --git a/src/components/Register/RegisterUniversity.tsx b/src/components/Register/RegisterUniversity.tsx
index 4b7b3cf..fdd5a6e 100644
--- a/src/components/Register/RegisterUniversity.tsx
+++ b/src/components/Register/RegisterUniversity.tsx
@@ -18,7 +18,7 @@ import {
   Alert,
   AlertIcon
 } from "@chakra-ui/react"
-import { ViewIcon, ViewOffIcon, WarningIcon } from "@chakra-ui/icons"
+import { ViewIcon, ViewOffIcon } from "@chakra-ui/icons"
 import { Link } from "react-router-dom"
 import { FaSun, FaMoon } from "react-icons/fa"
 import useAxiosPrivate from "../../hooks/axiosPrivate"
@@ -54,7 +54,6 @@ const RegisterUni = () => {
   const [errMsg, setErrMsg] = useState("")
 
   const handleSubmit = async (e: any) => {
-    console.log("SUBMIT")
     e.preventDefault()
     // check if there are some empty fields
     if (
@@ -84,7 +83,7 @@ const RegisterUni = () => {
       return
     }
     try {
-      const response = await axiosInstance.post(
+      await axiosInstance.post(
         REGISTER_URL,
         {
           name: name,
diff --git a/src/components/Report/Report.tsx b/src/components/Report/Report.tsx
index 4c51a81..93edbd6 100644
--- a/src/components/Report/Report.tsx
+++ b/src/components/Report/Report.tsx
@@ -59,7 +59,6 @@ const Report: React.FC = () => {
     params.append("name", search)
     params.append("itemsperpage", String(itemsPerPage))
     params.append("currentPage", String(currentPage))
-    console.log(params.toString())
     url.search = params.toString()
     const response = await axiosInstance.get(url.toString())
     const students = await response.data
-- 
GitLab