From 0bb094af86ab973a6bcd2807004734f503c821f1 Mon Sep 17 00:00:00 2001 From: ksbin1025 Date: Thu, 4 Nov 2021 18:57:37 +0900 Subject: [PATCH] =?UTF-8?q?impoer=20.js=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/apis/subject.api.js | 2 +- client/src/components/Buttons/AddBtn.js | 2 +- client/src/components/Calendar/AdminMonthly.js | 8 ++++---- client/src/components/Calendar/CustomView.js | 4 ++-- client/src/components/Calendar/DateView.js | 2 +- client/src/components/Calendar/Weekly.js | 2 +- client/src/components/Footer.js | 4 ++-- client/src/components/Form/LoginForm.js | 4 ++-- client/src/components/Form/ScheduleForm.js | 6 +++--- client/src/components/Form/SignupForm.js | 2 +- client/src/components/Form/StudyPlanEditForm.js | 8 ++++---- client/src/components/Form/SubjectForm.js | 4 ++-- client/src/components/PrivateRoute.js | 2 +- client/src/components/Schedule/ScheduleCarousel.js | 2 +- client/src/components/Schedule/ScheduleList.js | 6 +++--- client/src/components/StudyPlan/AddplanList.js | 2 +- client/src/components/StudyPlan/PlanItem.js | 2 +- client/src/components/StudyPlanList.js | 6 +++--- client/src/components/TodoList.js | 4 ++-- client/src/pages/Admin/AdminPage.js | 6 +++--- client/src/pages/HomePage.js | 6 +++--- client/src/pages/LoginPage.js | 5 ----- client/src/pages/ScheduleEditPage.js | 2 +- client/src/pages/SchedulePage.js | 8 ++++---- client/src/pages/SignupPage.js | 5 +---- client/src/pages/StudyPlanEditPage.js | 2 +- client/src/pages/StudyPlanListPage.js | 6 +++--- client/src/pages/StudyPlanPage.js | 8 ++++---- client/src/pages/SubjectEditPage.js | 2 +- client/src/pages/ToDoPage.js | 10 +++++----- client/src/utils/auth.js | 9 --------- 31 files changed, 62 insertions(+), 79 deletions(-) delete mode 100644 client/src/utils/auth.js diff --git a/client/src/apis/subject.api.js b/client/src/apis/subject.api.js index 28817d5..afbeab6 100644 --- a/client/src/apis/subject.api.js +++ b/client/src/apis/subject.api.js @@ -1,5 +1,5 @@ import axios from "axios"; -import baseUrl from "../utils/baseUrl.js"; +import baseUrl from "../utils/baseUrl"; const addsubject = async (info, userId) => { const url = `${baseUrl}/api/subject/addsubject`; diff --git a/client/src/components/Buttons/AddBtn.js b/client/src/components/Buttons/AddBtn.js index b8a56f5..5ba8bdd 100644 --- a/client/src/components/Buttons/AddBtn.js +++ b/client/src/components/Buttons/AddBtn.js @@ -1,4 +1,4 @@ -import TodoModal from "../Modal/TodoModal.js"; +import TodoModal from "../Modal/TodoModal"; import styles from "./buttons.module.scss"; const AddBtn = () => { diff --git a/client/src/components/Calendar/AdminMonthly.js b/client/src/components/Calendar/AdminMonthly.js index f3ce08f..b61a7b9 100644 --- a/client/src/components/Calendar/AdminMonthly.js +++ b/client/src/components/Calendar/AdminMonthly.js @@ -1,9 +1,9 @@ import { useState, useEffect, useRef } from "react"; -import CalendarBtn from "../Buttons/CalendarBtn.js"; -import DatePickerModal from "../Modal/DatePickerModal.js"; -import ScheduleModal from "../Modal/ScheduleModal.js"; +import CalendarBtn from "../Buttons/CalendarBtn"; +import DatePickerModal from "../Modal/DatePickerModal"; +import ScheduleModal from "../Modal/ScheduleModal"; import scheduleApi from "../../apis/schedule.api"; -import catchErrors from "../../utils/catchErrors.js"; +import catchErrors from "../../utils/catchErrors"; import moment from 'moment'; import FullCalendar from '@fullcalendar/react'; import dayGridPlugin from '@fullcalendar/daygrid'; diff --git a/client/src/components/Calendar/CustomView.js b/client/src/components/Calendar/CustomView.js index b70fd4f..98bebc0 100644 --- a/client/src/components/Calendar/CustomView.js +++ b/client/src/components/Calendar/CustomView.js @@ -1,5 +1,5 @@ -import ScheduleCarousel from "../Schedule/ScheduleCarousel.js"; -import ScheduleList from "../Schedule/ScheduleList.js"; +import ScheduleCarousel from "../Schedule/ScheduleCarousel"; +import ScheduleList from "../Schedule/ScheduleList"; import { createPlugin } from '@fullcalendar/react'; const CustomDateView = () => { diff --git a/client/src/components/Calendar/DateView.js b/client/src/components/Calendar/DateView.js index 47fda6a..f5137f3 100644 --- a/client/src/components/Calendar/DateView.js +++ b/client/src/components/Calendar/DateView.js @@ -2,7 +2,7 @@ import { useEffect, useRef } from "react"; import { useHistory, useParams } from "react-router-dom"; import moment from 'moment'; import FullCalendar from '@fullcalendar/react'; -import customViewPlugin from "./CustomView.js"; +import customViewPlugin from "./CustomView"; import bootstrapPlugin from '@fullcalendar/bootstrap'; import '@fortawesome/fontawesome-free/css/all.css'; diff --git a/client/src/components/Calendar/Weekly.js b/client/src/components/Calendar/Weekly.js index 8851194..89d6fa5 100644 --- a/client/src/components/Calendar/Weekly.js +++ b/client/src/components/Calendar/Weekly.js @@ -1,6 +1,6 @@ import { useState, useEffect, useRef } from "react"; import { useHistory, useParams } from "react-router-dom"; -import Date from "./DateSet.js"; +import Date from "./DateSet"; import moment from 'moment'; import FullCalendar, { createPlugin } from '@fullcalendar/react'; import interactionPlugin from "@fullcalendar/interaction"; diff --git a/client/src/components/Footer.js b/client/src/components/Footer.js index e1eed77..0a6e017 100644 --- a/client/src/components/Footer.js +++ b/client/src/components/Footer.js @@ -1,5 +1,5 @@ -import EditBtn from "./Buttons/EditBtn.js"; -import AddBtn from "./Buttons/AddBtn.js"; +import EditBtn from "./Buttons/EditBtn"; +import AddBtn from "./Buttons/AddBtn"; const Footer = ({ pathname="todo" }) => { return ( diff --git a/client/src/components/Form/LoginForm.js b/client/src/components/Form/LoginForm.js index 0b3deca..dbd26a6 100644 --- a/client/src/components/Form/LoginForm.js +++ b/client/src/components/Form/LoginForm.js @@ -1,9 +1,9 @@ import { useState } from 'react'; import { Redirect, Link } from "react-router-dom"; import { Formik } from 'formik'; -import { useAuth } from "../../utils/context.js"; +import { useAuth } from "../../utils/context"; import * as Yup from 'yup'; -import catchErrors from "../../utils/catchErrors.js"; +import catchErrors from "../../utils/catchErrors"; import styles from "./form.module.scss"; const LoginForm = () => { diff --git a/client/src/components/Form/ScheduleForm.js b/client/src/components/Form/ScheduleForm.js index df99edc..080ae88 100644 --- a/client/src/components/Form/ScheduleForm.js +++ b/client/src/components/Form/ScheduleForm.js @@ -1,9 +1,9 @@ import { useState, useEffect } from "react"; import { Redirect, useParams } from "react-router-dom"; -import BtnGroup from "../Buttons/BtnGroup.js"; +import BtnGroup from "../Buttons/BtnGroup"; import scheduleApi from "../../apis/schedule.api"; -import { useAuth } from "../../utils/context.js"; -import catchErrors from "../../utils/catchErrors.js"; +import { useAuth } from "../../utils/context"; +import catchErrors from "../../utils/catchErrors"; import styles from "./form.module.scss"; const ScheduleForm = () => { diff --git a/client/src/components/Form/SignupForm.js b/client/src/components/Form/SignupForm.js index 41f693d..6639be4 100644 --- a/client/src/components/Form/SignupForm.js +++ b/client/src/components/Form/SignupForm.js @@ -3,7 +3,7 @@ import { Redirect } from "react-router-dom"; import { Formik } from 'formik'; import * as Yup from 'yup'; import authApi from '../../apis/auth.api'; -import catchErrors from "../../utils/catchErrors.js"; +import catchErrors from "../../utils/catchErrors"; import styles from "./form.module.scss"; const SignupForm = () => { diff --git a/client/src/components/Form/StudyPlanEditForm.js b/client/src/components/Form/StudyPlanEditForm.js index 8e47d9d..e0fb293 100644 --- a/client/src/components/Form/StudyPlanEditForm.js +++ b/client/src/components/Form/StudyPlanEditForm.js @@ -1,11 +1,11 @@ import { useState, useEffect } from 'react'; import { useParams } from 'react-router-dom'; -import { useAuth } from "../../utils/context.js"; +import { useAuth } from "../../utils/context"; import BtnGroup from "../Buttons/BtnGroup"; -import subjectApi from '../../apis/subject.api.js'; -import planApi from '../../apis/plan.api.js'; +import subjectApi from '../../apis/subject.api'; +import planApi from '../../apis/plan.api'; +import catchErrors from '../../utils/catchErrors'; import styles from "./form.module.scss"; -import catchErrors from '../../utils/catchErrors.js'; const StudyPlanEditForm = () => { const { user } = useAuth(); diff --git a/client/src/components/Form/SubjectForm.js b/client/src/components/Form/SubjectForm.js index fc4405e..656d02a 100644 --- a/client/src/components/Form/SubjectForm.js +++ b/client/src/components/Form/SubjectForm.js @@ -1,9 +1,9 @@ import { useState, useEffect } from 'react'; import { Redirect, useParams } from 'react-router-dom'; -import { useAuth } from '../../utils/context.js'; +import { useAuth } from '../../utils/context'; import BtnGroup from "../Buttons/BtnGroup"; import subjectApi from '../../apis/subject.api'; -import catchErrors from '../../utils/catchErrors.js'; +import catchErrors from '../../utils/catchErrors'; import styles from "./form.module.scss"; const SubjectForm = () => { diff --git a/client/src/components/PrivateRoute.js b/client/src/components/PrivateRoute.js index b39474a..b3d717f 100644 --- a/client/src/components/PrivateRoute.js +++ b/client/src/components/PrivateRoute.js @@ -1,5 +1,5 @@ import { Redirect, Route } from "react-router-dom"; -import { useAuth } from "../utils/context.js" +import { useAuth } from "../utils/context"; import ErrorPage from "../pages/ErrorPage"; const PrivateRoute = ({ component: Component, ...rest }) => { diff --git a/client/src/components/Schedule/ScheduleCarousel.js b/client/src/components/Schedule/ScheduleCarousel.js index 27650a6..94722ae 100644 --- a/client/src/components/Schedule/ScheduleCarousel.js +++ b/client/src/components/Schedule/ScheduleCarousel.js @@ -2,7 +2,7 @@ import { useState, useEffect } from "react"; import { useParams } from "react-router-dom"; import KU from "./KUSchedule.js"; import scheduleApi from "../../apis/schedule.api"; -import catchErrors from "../../utils/catchErrors.js"; +import catchErrors from "../../utils/catchErrors"; const ScheduleCarousel = () => { const [scheduleList, setScheduleList] = useState([]) diff --git a/client/src/components/Schedule/ScheduleList.js b/client/src/components/Schedule/ScheduleList.js index 7657d1a..6e562ce 100644 --- a/client/src/components/Schedule/ScheduleList.js +++ b/client/src/components/Schedule/ScheduleList.js @@ -1,9 +1,9 @@ import { useState, useEffect } from "react"; import { useParams } from "react-router-dom"; -import Item from "./ScheduleItem.js"; +import Item from "./ScheduleItem"; import scheduleApi from "../../apis/schedule.api"; -import { useAuth } from "../../utils/context.js"; -import catchErrors from "../../utils/catchErrors.js"; +import { useAuth } from "../../utils/context"; +import catchErrors from "../../utils/catchErrors"; import styles from "./schedule.module.scss"; const ScheduleList = () => { diff --git a/client/src/components/StudyPlan/AddplanList.js b/client/src/components/StudyPlan/AddplanList.js index 5669e45..f70d079 100644 --- a/client/src/components/StudyPlan/AddplanList.js +++ b/client/src/components/StudyPlan/AddplanList.js @@ -1,4 +1,4 @@ -import PlanItem from "./PlanItem.js"; +import PlanItem from "./PlanItem"; import styles from "./studyplan.module.scss"; const AddplanList = () => { diff --git a/client/src/components/StudyPlan/PlanItem.js b/client/src/components/StudyPlan/PlanItem.js index 8959430..bd8f9aa 100644 --- a/client/src/components/StudyPlan/PlanItem.js +++ b/client/src/components/StudyPlan/PlanItem.js @@ -1,6 +1,6 @@ import { useState } from "react"; import { Link } from "react-router-dom"; -import catchErrors from "../../utils/catchErrors.js"; +import catchErrors from "../../utils/catchErrors"; import styles from "../Schedule/schedule.module.scss"; import styles2 from "./studyplan.module.scss"; diff --git a/client/src/components/StudyPlanList.js b/client/src/components/StudyPlanList.js index 99828a9..eb6e260 100644 --- a/client/src/components/StudyPlanList.js +++ b/client/src/components/StudyPlanList.js @@ -1,8 +1,8 @@ import { useState, useEffect } from 'react'; -import { useAuth } from "../utils/context.js" +import { useAuth } from "../utils/context"; import { Link } from "react-router-dom"; -import StudyPlanCard from "./Card/StudyPlanCard.js"; -import subjectApi from '../apis/subject.api.js'; +import StudyPlanCard from "./Card/StudyPlanCard"; +import subjectApi from '../apis/subject.api'; const StudyPlanList = () => { const { user } = useAuth(); diff --git a/client/src/components/TodoList.js b/client/src/components/TodoList.js index 6d1b9fd..03cac1c 100644 --- a/client/src/components/TodoList.js +++ b/client/src/components/TodoList.js @@ -1,5 +1,5 @@ -import TodoModal from "../components/Modal/TodoModal.js"; -import TodoPostModal from "../components/Modal/TodoPostModal.js"; +import TodoModal from "../components/Modal/TodoModal"; +import TodoPostModal from "../components/Modal/TodoPostModal"; import styles from "../components/Form/form.module.scss"; const TodoList = () => { diff --git a/client/src/pages/Admin/AdminPage.js b/client/src/pages/Admin/AdminPage.js index 01bc010..bf5b125 100644 --- a/client/src/pages/Admin/AdminPage.js +++ b/client/src/pages/Admin/AdminPage.js @@ -1,6 +1,6 @@ -import Monthly from "../../components/Calendar/AdminMonthly.js"; -import Footer from "../../components/Footer.js"; -import { useAuth } from "../../utils/context.js"; +import Monthly from "../../components/Calendar/AdminMonthly"; +import Footer from "../../components/Footer"; +import { useAuth } from "../../utils/context"; import styles from "./admin.module.scss"; const AdminPage = () => { diff --git a/client/src/pages/HomePage.js b/client/src/pages/HomePage.js index 226da8b..45b2622 100644 --- a/client/src/pages/HomePage.js +++ b/client/src/pages/HomePage.js @@ -1,6 +1,6 @@ -import Menu from "../components/Menu/Menu.js"; -import Monthly from "../components/Calendar/Monthly.js"; -import Footer from "../components/Footer.js"; +import Menu from "../components/Menu/Menu"; +import Monthly from "../components/Calendar/Monthly"; +import Footer from "../components/Footer"; const HomePage = () => { return ( diff --git a/client/src/pages/LoginPage.js b/client/src/pages/LoginPage.js index 5fd017c..a848531 100644 --- a/client/src/pages/LoginPage.js +++ b/client/src/pages/LoginPage.js @@ -1,10 +1,6 @@ -import { Link } from 'react-router-dom'; import LoginForm from '../components/Form/LoginForm'; -import { useAuth } from "../utils/context"; function LoginPage() { - const { user } = useAuth() - console.log("LoginPage",user) return ( <>
@@ -12,7 +8,6 @@ function LoginPage() {

-일정관리앱

- asda ); } diff --git a/client/src/pages/ScheduleEditPage.js b/client/src/pages/ScheduleEditPage.js index 082048e..9534671 100644 --- a/client/src/pages/ScheduleEditPage.js +++ b/client/src/pages/ScheduleEditPage.js @@ -1,4 +1,4 @@ -import ScheduleForm from "../components/Form/ScheduleForm.js"; +import ScheduleForm from "../components/Form/ScheduleForm"; const ScheduleEditPage = () => { return ( diff --git a/client/src/pages/SchedulePage.js b/client/src/pages/SchedulePage.js index 0d5a35b..4cd6b78 100644 --- a/client/src/pages/SchedulePage.js +++ b/client/src/pages/SchedulePage.js @@ -1,7 +1,7 @@ -import Menu from "../components/Menu/Menu.js"; -import HomeBtn from "../components/Buttons/HomeBtn.js"; -import DateView from "../components/Calendar/DateView.js"; -import Footer from "../components/Footer.js"; +import Menu from "../components/Menu/Menu"; +import HomeBtn from "../components/Buttons/HomeBtn"; +import DateView from "../components/Calendar/DateView"; +import Footer from "../components/Footer"; const SchedulePage = () => { return ( diff --git a/client/src/pages/SignupPage.js b/client/src/pages/SignupPage.js index b4ac048..040001f 100644 --- a/client/src/pages/SignupPage.js +++ b/client/src/pages/SignupPage.js @@ -1,10 +1,7 @@ -import BackBtn from "../components/Buttons/BackBtn.js"; +import BackBtn from "../components/Buttons/BackBtn"; import SignupForm from '../components/Form/SignupForm'; -import { useAuth } from "../utils/context"; function SingupPage() { - const { user } = useAuth() - console.log("Signup user",user) return ( <> diff --git a/client/src/pages/StudyPlanEditPage.js b/client/src/pages/StudyPlanEditPage.js index b621e44..12d1529 100644 --- a/client/src/pages/StudyPlanEditPage.js +++ b/client/src/pages/StudyPlanEditPage.js @@ -1,4 +1,4 @@ -import StudyPlanEditForm from "../components/Form/StudyPlanEditForm.js" +import StudyPlanEditForm from "../components/Form/StudyPlanEditForm" const StudyPlanEditPage = () => { return ( diff --git a/client/src/pages/StudyPlanListPage.js b/client/src/pages/StudyPlanListPage.js index 35c9240..54ba45e 100644 --- a/client/src/pages/StudyPlanListPage.js +++ b/client/src/pages/StudyPlanListPage.js @@ -1,6 +1,6 @@ -import Menu from "../components/Menu/Menu.js"; -import HomeBtn from "../components/Buttons/HomeBtn.js"; -import StudyPlanList from "../components/StudyPlanList.js"; +import Menu from "../components/Menu/Menu"; +import HomeBtn from "../components/Buttons/HomeBtn"; +import StudyPlanList from "../components/StudyPlanList"; const StudyPlanListPage = () => { return ( diff --git a/client/src/pages/StudyPlanPage.js b/client/src/pages/StudyPlanPage.js index 7bbac03..ae5b1c4 100644 --- a/client/src/pages/StudyPlanPage.js +++ b/client/src/pages/StudyPlanPage.js @@ -1,8 +1,8 @@ import { useParams } from "react-router-dom"; -import Menu from "../components/Menu/Menu.js"; -import BackBtn from "../components/Buttons/BackBtn.js"; -import Footer from "../components/Footer.js"; -import AddplanList from "../components/StudyPlan/AddplanList.js"; +import Menu from "../components/Menu/Menu"; +import BackBtn from "../components/Buttons/BackBtn"; +import Footer from "../components/Footer"; +import AddplanList from "../components/StudyPlan/AddplanList"; const StudyPlanPage = () => { const { subjectId } = useParams(); diff --git a/client/src/pages/SubjectEditPage.js b/client/src/pages/SubjectEditPage.js index a47f740..09d0877 100644 --- a/client/src/pages/SubjectEditPage.js +++ b/client/src/pages/SubjectEditPage.js @@ -1,4 +1,4 @@ -import SubjectForm from "../components/Form/SubjectForm.js" +import SubjectForm from "../components/Form/SubjectForm" const SubjectEditPage = () => { return ( diff --git a/client/src/pages/ToDoPage.js b/client/src/pages/ToDoPage.js index 632dfc7..5acaeee 100644 --- a/client/src/pages/ToDoPage.js +++ b/client/src/pages/ToDoPage.js @@ -1,8 +1,8 @@ -import Menu from "../components/Menu/Menu.js"; -import HomeBtn from "../components/Buttons/HomeBtn.js"; -import Weekly from "../components/Calendar/Weekly.js"; -import TodoList from "../components/TodoList.js"; -import Footer from "../components/Footer.js"; +import Menu from "../components/Menu/Menu"; +import HomeBtn from "../components/Buttons/HomeBtn"; +import Weekly from "../components/Calendar/Weekly"; +import TodoList from "../components/TodoList"; +import Footer from "../components/Footer"; const ToDoPage = () => { return ( diff --git a/client/src/utils/auth.js b/client/src/utils/auth.js deleted file mode 100644 index cd06faa..0000000 --- a/client/src/utils/auth.js +++ /dev/null @@ -1,9 +0,0 @@ -export function getLoggedIn() { - const loggedData = localStorage.getItem("login"); - let loggedIn = null; - if (loggedData) { - // loggedIn = JSON.parse(loggedData); - loggedIn = loggedData - } - return loggedIn; -} \ No newline at end of file -- GitLab