diff --git a/src/containers/UpdateCourses/index.js b/src/containers/UpdateCourses/index.js index 38f618a..c8dc895 100644 --- a/src/containers/UpdateCourses/index.js +++ b/src/containers/UpdateCourses/index.js @@ -1,5 +1,4 @@ import React, { useEffect } from "react"; -import ReactGA from "react-ga"; import Helmet from "react-helmet"; import { useMixpanel } from "hooks/useMixpanel"; import styled from "styled-components"; @@ -14,9 +13,6 @@ import { useColorModeValue, } from "@chakra-ui/react"; -import { postScrapeSchedule } from "services/api"; - -import { InfoToast, SuccessToast, ErrorToast } from "components/Toast"; import { InputPassword, InputText } from "components/Forms"; import { Bauhaus } from "components/Bauhaus"; @@ -60,24 +56,24 @@ const UpdateCourses = () => { }, [password, isPasswordChanged]); const onSubmit = async (values) => { - try { - InfoToast("Sedang memperbaharui jadwal", isMobile, theme); - await postScrapeSchedule(values); - setTimeout(() => { - toast.closeAll(); - ReactGA.event({ - category: "Update Matkul", - action: "Updated the courses", - }); - SuccessToast("Jadwal berhasil diperbaharui", isMobile, theme); - window.location.replace("/susun"); - }, 1000); - } catch (e) { - setTimeout(() => { - toast.closeAll(); - ErrorToast(e.response.data.message, isMobile, theme); - }, 1000); - } + // try { + // InfoToast("Sedang memperbaharui jadwal", isMobile, theme); + // await postScrapeSchedule(values); + // setTimeout(() => { + // toast.closeAll(); + // ReactGA.event({ + // category: "Update Matkul", + // action: "Updated the courses", + // }); + // SuccessToast("Jadwal berhasil diperbaharui", isMobile, theme); + // window.location.replace("/susun"); + // }, 1000); + // } catch (e) { + // setTimeout(() => { + // toast.closeAll(); + // ErrorToast(e.response.data.message, isMobile, theme); + // }, 1000); + // } }; return ( @@ -126,6 +122,7 @@ const UpdateCourses = () => { />