From 172400a9763e8a1ec6b16c86e7dc6a45b2e97f63 Mon Sep 17 00:00:00 2001 From: hai Date: Wed, 22 May 2024 00:20:47 +0900 Subject: [PATCH 01/21] =?UTF-8?q?feat:=20=EB=A9=94=EC=9D=B8=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EC=97=90=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20=EB=A0=8C=EB=8D=94=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/pages/MainPage.jsx | 62 +++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 FE/error/src/pages/MainPage.jsx diff --git a/FE/error/src/pages/MainPage.jsx b/FE/error/src/pages/MainPage.jsx new file mode 100644 index 00000000..9006cfc7 --- /dev/null +++ b/FE/error/src/pages/MainPage.jsx @@ -0,0 +1,62 @@ +import styled from "styled-components"; +import EconoCalendar from "../components/EconoCalendar"; +import ProfileBar from "../components/SideBar/ProfileBar"; +import PublicFilter from "../components/SideBar/PublicFilter"; +import IndividualFilter from "../components/SideBar/IndividualFilter"; +import GroupFilter from "../components/SideBar/GroupFilter"; + +const MainPage = () => { + return ( +
+ + + ERROR + + + + + + + + + + +
+ ); +}; + +export default MainPage; + +const SideBar = styled.div` + width: 15vw; + height: 98.1vh; + margin-top: 1rem; +`; + +const CalendarPage = styled.div` + display: flex; + width: 100%; +`; + +const LineBox = styled.div` + width: 100%; + height: 1.25rem; + border: 1px solid #ddd; + border-right: none; + margin-top: 1.63em; +`; + +const Logo = styled.div` + font-size: 2rem; + font-weight: bold; + margin-left: 1.5rem; + margin-top: 0.3rem; + color: #ff9999; + margin-bottom: 1rem; +`; + +const FilterFrame = styled.div` + display: flex; + flex-direction: column; + justify-content: space-between; +`; From b5d42be09b1c787e9af1eb1987dadd74a135c0a6 Mon Sep 17 00:00:00 2001 From: hai Date: Wed, 22 May 2024 00:21:27 +0900 Subject: [PATCH 02/21] =?UTF-8?q?feat:=20=EC=88=98=EC=A0=95=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/components/pages/MainPage.jsx | 47 ------------------- .../{components => }/pages/CalendarModify.jsx | 2 +- 2 files changed, 1 insertion(+), 48 deletions(-) delete mode 100644 FE/error/src/components/pages/MainPage.jsx rename FE/error/src/{components => }/pages/CalendarModify.jsx (99%) diff --git a/FE/error/src/components/pages/MainPage.jsx b/FE/error/src/components/pages/MainPage.jsx deleted file mode 100644 index 68ebc8aa..00000000 --- a/FE/error/src/components/pages/MainPage.jsx +++ /dev/null @@ -1,47 +0,0 @@ -import styled from "styled-components"; -import EconoCalendar from "../EconoCalendar"; - -const MainPage = () => { - return ( -
- - - ERROR - - - - -
- ); -}; - -export default MainPage; - -const SideBar = styled.div` - width: 20vw; - height: 98.1vh; - margin-top: 1rem; -`; - -const CalendarPage = styled.div` - display: flex; - width: 100%; -`; - -const LineBox = styled.div` - width: 100%; - height: 1.25rem; - border: 1px solid #ddd; - border-right: none; - - margin-top: 1.63em; -`; - -const Logo = styled.div` - font-size: 2rem; - font-weight: bold; - margin-left: 1.5rem; - margin-top: 0.3rem; - color: #ff9999; - margin-bottom: 1rem; -`; diff --git a/FE/error/src/components/pages/CalendarModify.jsx b/FE/error/src/pages/CalendarModify.jsx similarity index 99% rename from FE/error/src/components/pages/CalendarModify.jsx rename to FE/error/src/pages/CalendarModify.jsx index 41e87d2b..de2d2298 100644 --- a/FE/error/src/components/pages/CalendarModify.jsx +++ b/FE/error/src/pages/CalendarModify.jsx @@ -2,7 +2,7 @@ import styled from "styled-components"; import { useState, useEffect } from "react"; import { useLocation } from "react-router-dom"; import axios from "axios"; -import TimeSelect from "../TimeSelect"; +import TimeSelect from "../components/TimeSelect"; import ReactQuill from "react-quill"; import { IoMdClose } from "react-icons/io"; import { useNavigate } from "react-router-dom"; From fa4e44b8048c76b18f6233ccb60e59a229731b06 Mon Sep 17 00:00:00 2001 From: hai Date: Wed, 22 May 2024 00:22:35 +0900 Subject: [PATCH 03/21] =?UTF-8?q?feat:=20=EC=82=AD=EC=A0=9C=EC=9D=B4?= =?UTF-8?q?=EB=B2=A4=ED=8A=B8=20=EB=B0=9C=EC=83=9D=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/components/EconoCalendar.jsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/FE/error/src/components/EconoCalendar.jsx b/FE/error/src/components/EconoCalendar.jsx index a3ac2307..70677f06 100644 --- a/FE/error/src/components/EconoCalendar.jsx +++ b/FE/error/src/components/EconoCalendar.jsx @@ -41,7 +41,7 @@ const EconoCalendar = () => { const day = ("0" + today.getDate()).slice(-2); return `${year}-${month}-${day}`; }; - + useEffect(() => { const instance = axios.create({ baseURL: `${import.meta.env.VITE_ERROR_API}`, @@ -62,16 +62,12 @@ const EconoCalendar = () => { .catch((error) => { console.error("Error fetching events:", error); }); - }, [events]); + }, []); const handleUpdateData = (newData) => { setEvents(...newData); }; - const handleUpdateData = (newData) => { - setEvents(newData); - }; - return ( <> From c327a493d833437214892ee0a3251c816e50cb34 Mon Sep 17 00:00:00 2001 From: hai Date: Wed, 22 May 2024 00:23:52 +0900 Subject: [PATCH 04/21] =?UTF-8?q?chore:=20=ED=94=84=EB=A1=AD=EC=8A=A4?= =?UTF-8?q?=EB=A1=9C=20=EB=B0=9B=EC=95=84=EC=98=A8=20=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=EB=B9=A8=EA=B0=84=EB=B0=91=EC=A4=84=20=EC=83=9D?= =?UTF-8?q?=EA=B8=B0=EB=8A=94=20=EC=9D=B4=EC=8A=88=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/.eslintrc.cjs | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/FE/error/.eslintrc.cjs b/FE/error/.eslintrc.cjs index 3e212e1d..d5a5d489 100644 --- a/FE/error/.eslintrc.cjs +++ b/FE/error/.eslintrc.cjs @@ -2,20 +2,21 @@ module.exports = { root: true, env: { browser: true, es2020: true }, extends: [ - 'eslint:recommended', - 'plugin:react/recommended', - 'plugin:react/jsx-runtime', - 'plugin:react-hooks/recommended', + "eslint:recommended", + "plugin:react/recommended", + "plugin:react/jsx-runtime", + "plugin:react-hooks/recommended", ], - ignorePatterns: ['dist', '.eslintrc.cjs'], - parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, - settings: { react: { version: '18.2' } }, - plugins: ['react-refresh'], + ignorePatterns: ["dist", ".eslintrc.cjs"], + parserOptions: { ecmaVersion: "latest", sourceType: "module" }, + settings: { react: { version: "18.2" } }, + plugins: ["react-refresh"], rules: { - 'react/jsx-no-target-blank': 'off', - 'react-refresh/only-export-components': [ - 'warn', + "react/prop-types": "off", + "react/jsx-no-target-blank": "off", + "react-refresh/only-export-components": [ + "warn", { allowConstantExport: true }, ], }, -} +}; From 24b77c60bac82c93b98a7c827824d5775a696383 Mon Sep 17 00:00:00 2001 From: hai Date: Wed, 22 May 2024 00:24:13 +0900 Subject: [PATCH 05/21] =?UTF-8?q?style:=20=EA=B7=B8=EB=A3=B9=ED=95=84?= =?UTF-8?q?=ED=84=B0=EB=A7=81=20css=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/SideBar/GroupFilter.jsx | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 FE/error/src/components/SideBar/GroupFilter.jsx diff --git a/FE/error/src/components/SideBar/GroupFilter.jsx b/FE/error/src/components/SideBar/GroupFilter.jsx new file mode 100644 index 00000000..5c64d6c8 --- /dev/null +++ b/FE/error/src/components/SideBar/GroupFilter.jsx @@ -0,0 +1,42 @@ +import { FaPlus } from "react-icons/fa6"; +import { SlArrowDown } from "react-icons/sl"; +import styled from "styled-components"; + +const GroupFilter = () => { + const createGroupFilter = () => {}; + return ( + + + + 그룹 캘린더 + + + + + + + + + + ); +}; + +export default GroupFilter; + +const GroupFilterFrame = styled.div` + margin: 1.3rem; + display: flex; + justify-content: space-between; + align-items: center; +`; +const TextContainer = styled.div` + /* 필요한 스타일이 있다면 여기에 추가 */ +`; + +const IconContainer = styled.div` + /* 필요한 스타일이 있다면 여기에 추가 */ +`; +const GroupFilterPlusBtn = styled.button` + background: none; + border: none; +`; From d0906ebf548ef9a8929b08a6e08371f8e538ad9a Mon Sep 17 00:00:00 2001 From: hai Date: Wed, 22 May 2024 00:24:25 +0900 Subject: [PATCH 06/21] =?UTF-8?q?style:=20=EA=B0=9C=EC=9D=B8=ED=95=84?= =?UTF-8?q?=ED=84=B0=EB=A7=81=20css=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/SideBar/IndividualFilter.jsx | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 FE/error/src/components/SideBar/IndividualFilter.jsx diff --git a/FE/error/src/components/SideBar/IndividualFilter.jsx b/FE/error/src/components/SideBar/IndividualFilter.jsx new file mode 100644 index 00000000..ff70d915 --- /dev/null +++ b/FE/error/src/components/SideBar/IndividualFilter.jsx @@ -0,0 +1,42 @@ +import { FaPlus } from "react-icons/fa6"; +import { SlArrowDown } from "react-icons/sl"; +import styled from "styled-components"; + +const IndividualFilter = () => { + const createIndividualFilter = () => {}; + return ( + + + + 개인 캘린더 + + + + + + + + + + ); +}; + +export default IndividualFilter; + +const IndividualFilterFrame = styled.div` + margin: 1.3rem; + display: flex; + justify-content: space-between; + align-items: center; +`; +const TextContainer = styled.div` + /* 필요한 스타일이 있다면 여기에 추가 */ +`; + +const IconContainer = styled.div` + /* 필요한 스타일이 있다면 여기에 추가 */ +`; +const IndividualFilterPlusBtn = styled.button` + background: none; + border: none; +`; From 7c1d2e7307f5b044b51da12e2c756076bb48761c Mon Sep 17 00:00:00 2001 From: hai Date: Wed, 22 May 2024 00:24:44 +0900 Subject: [PATCH 07/21] =?UTF-8?q?style:=20=ED=94=84=EB=A1=9C=ED=95=84?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=BB=A8=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=84=88=20=EC=A0=9C=EC=9E=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/components/SideBar/ProfileBar.jsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 FE/error/src/components/SideBar/ProfileBar.jsx diff --git a/FE/error/src/components/SideBar/ProfileBar.jsx b/FE/error/src/components/SideBar/ProfileBar.jsx new file mode 100644 index 00000000..0226546a --- /dev/null +++ b/FE/error/src/components/SideBar/ProfileBar.jsx @@ -0,0 +1,12 @@ +import styled from "styled-components"; + +const ProfileBar = () => { + return ; +}; + +export default ProfileBar; + +const ProfileFrame = styled.div` + width: 20rem; + height: 18.4375rem; +`; From aefa6518561a350dccb576be9197567f7e2da4dd Mon Sep 17 00:00:00 2001 From: hai Date: Wed, 22 May 2024 00:24:58 +0900 Subject: [PATCH 08/21] =?UTF-8?q?style:=20=ED=8D=BC=EB=B8=94=EB=A6=AD?= =?UTF-8?q?=ED=95=84=ED=84=B0=20css=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/SideBar/PublicFilter.jsx | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 FE/error/src/components/SideBar/PublicFilter.jsx diff --git a/FE/error/src/components/SideBar/PublicFilter.jsx b/FE/error/src/components/SideBar/PublicFilter.jsx new file mode 100644 index 00000000..a0aae1f3 --- /dev/null +++ b/FE/error/src/components/SideBar/PublicFilter.jsx @@ -0,0 +1,70 @@ +import styled from "styled-components"; +import { FaCheck } from "react-icons/fa"; + +import { useState } from "react"; + +const PublicFilter = () => { + const [publicClicked, setPublicClicked] = useState(false); + const [WeeklyClicked, setWeeklyClicked] = useState(false); + const handlePublicClick = () => { + if (publicClicked === false) setPublicClicked(true); + else setPublicClicked(false); + }; + const handleWeeklyClick = () => { + if (WeeklyClicked === false) setWeeklyClicked(true); + else setWeeklyClicked(false); + }; + return ( + +
+ 에코노 캘린더 +
+
+ + + + 공식행사 +
+
+ + + + 주간발표 +
+
+ ); +}; + +export default PublicFilter; + +const PublicFilterFrame = styled.div` + margin: 1.3rem; +`; +const PublicBtn = styled.button` + border: none; + background-color: #ff5b5b; + margin: 0.4rem; + color: white; + border: 0.15rem solid #ff5b5b; + border-radius: 0.15rem; + ${({ clicked }) => + clicked && + `background-color: transparent; + color: transparent; + border: 0.15em solid #ff5b5b; + `} +`; +const WeeklyBtn = styled.button` + border: none; + background-color: #63abff; + border: 0.15em solid #63abff; + color: aliceblue; + border-radius: 0.15rem; + margin: 0.4rem; + ${({ clicked }) => + clicked && + `background-color: transparent; + color: transparent; + border: 0.15em solid #63abff; + `} +`; From 88f5bea503f9e5b9f57bdf142acd6c4eff653d8a Mon Sep 17 00:00:00 2001 From: hai Date: Wed, 22 May 2024 23:49:59 +0900 Subject: [PATCH 09/21] =?UTF-8?q?feat:=20=EA=B2=BD=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/App.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FE/error/src/App.jsx b/FE/error/src/App.jsx index aeea3d08..09cee01a 100644 --- a/FE/error/src/App.jsx +++ b/FE/error/src/App.jsx @@ -1,7 +1,7 @@ import "./App.css"; import { Routes, Route } from "react-router-dom"; -import MainPage from "./components/pages/MainPage"; -import CalendarModify from "./components/pages/CalendarModify"; +import MainPage from "./pages/MainPage"; +import CalendarModify from "./pages/CalendarModify"; function App() { return ( From 3503d19e166c85645670b6397b5de4cf38a201eb Mon Sep 17 00:00:00 2001 From: hai Date: Wed, 22 May 2024 23:50:28 +0900 Subject: [PATCH 10/21] =?UTF-8?q?style:=20=EC=B0=BD=EC=97=90=20=EB=B3=80?= =?UTF-8?q?=ED=99=94=EC=97=90=20=EA=B4=80=EA=B3=84=EC=97=86=EC=9D=B4=20?= =?UTF-8?q?=EC=82=AC=EC=9D=B4=EB=93=9C=EB=B0=94=20=EA=B3=A0=EC=A0=95=20?= =?UTF-8?q?=ED=8F=AD=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/pages/MainPage.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FE/error/src/pages/MainPage.jsx b/FE/error/src/pages/MainPage.jsx index 9006cfc7..48eed4b3 100644 --- a/FE/error/src/pages/MainPage.jsx +++ b/FE/error/src/pages/MainPage.jsx @@ -28,7 +28,7 @@ const MainPage = () => { export default MainPage; const SideBar = styled.div` - width: 15vw; + width: 250px; height: 98.1vh; margin-top: 1rem; `; From 85401c458d4af6ac1d75a8c6133dd12c94b234ea Mon Sep 17 00:00:00 2001 From: hai Date: Wed, 22 May 2024 23:50:48 +0900 Subject: [PATCH 11/21] =?UTF-8?q?feat:=20=EC=8A=A4=EC=BC=80=EC=A4=84=20?= =?UTF-8?q?=EC=B2=B4=ED=81=AC=EB=B0=95=EC=8A=A4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/components/ScheduleToggle.jsx | 33 +++++++++ .../src/components/SideBar/PublicFilter.jsx | 68 +++++-------------- 2 files changed, 50 insertions(+), 51 deletions(-) create mode 100644 FE/error/src/components/ScheduleToggle.jsx diff --git a/FE/error/src/components/ScheduleToggle.jsx b/FE/error/src/components/ScheduleToggle.jsx new file mode 100644 index 00000000..0522e451 --- /dev/null +++ b/FE/error/src/components/ScheduleToggle.jsx @@ -0,0 +1,33 @@ +import styled from "styled-components"; +import { useState } from "react"; + +const ScheduleToggle = ({ color }) => { + const [clicked, setClicked] = useState(true); + + const handleOnClick = () => { + setClicked(!clicked); + console.log(clicked); + }; + + return ( + <> + + + ); +}; + +export default ScheduleToggle; + +const ClickedBox = styled.input` + appearance: none; + width: 1.4rem; + height: 1.4rem; + border: 1.5px solid gainsboro; + opacity: 0.7; + border-radius: 0.35rem; + &:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.707 7.293a1 1 0 0 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l4-4a1 1 0 0 0-1.414-1.414L7 8.586 5.707 7.293z'/%3e%3c/svg%3e"); + background-color: ${(props) => props.color}; + opacity: 0.7; + } +`; diff --git a/FE/error/src/components/SideBar/PublicFilter.jsx b/FE/error/src/components/SideBar/PublicFilter.jsx index a0aae1f3..687f5fd1 100644 --- a/FE/error/src/components/SideBar/PublicFilter.jsx +++ b/FE/error/src/components/SideBar/PublicFilter.jsx @@ -1,36 +1,25 @@ import styled from "styled-components"; -import { FaCheck } from "react-icons/fa"; - -import { useState } from "react"; +import ScheduleToggle from "../ScheduleToggle"; const PublicFilter = () => { - const [publicClicked, setPublicClicked] = useState(false); - const [WeeklyClicked, setWeeklyClicked] = useState(false); - const handlePublicClick = () => { - if (publicClicked === false) setPublicClicked(true); - else setPublicClicked(false); - }; - const handleWeeklyClick = () => { - if (WeeklyClicked === false) setWeeklyClicked(true); - else setWeeklyClicked(false); - }; return ( -
+
에코노 캘린더
-
- - - + + 공식행사 -
-
- - - + + + 주간발표 -
+ ); }; @@ -40,31 +29,8 @@ export default PublicFilter; const PublicFilterFrame = styled.div` margin: 1.3rem; `; -const PublicBtn = styled.button` - border: none; - background-color: #ff5b5b; - margin: 0.4rem; - color: white; - border: 0.15rem solid #ff5b5b; - border-radius: 0.15rem; - ${({ clicked }) => - clicked && - `background-color: transparent; - color: transparent; - border: 0.15em solid #ff5b5b; - `} -`; -const WeeklyBtn = styled.button` - border: none; - background-color: #63abff; - border: 0.15em solid #63abff; - color: aliceblue; - border-radius: 0.15rem; - margin: 0.4rem; - ${({ clicked }) => - clicked && - `background-color: transparent; - color: transparent; - border: 0.15em solid #63abff; - `} + +const SceduleType = styled.div` + display: flex; + align-items: center; `; From 0008354e550724b3befd5439d7e680c802d94cbf Mon Sep 17 00:00:00 2001 From: hai Date: Thu, 23 May 2024 00:06:25 +0900 Subject: [PATCH 12/21] =?UTF-8?q?style:=20=EC=98=A4=EB=8A=98=20=EB=82=A0?= =?UTF-8?q?=EC=A7=9C=20=ED=8F=AC=EC=BB=A4=EC=8A=A4=20=EC=9B=90=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/components/EconoCalendar.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/FE/error/src/components/EconoCalendar.jsx b/FE/error/src/components/EconoCalendar.jsx index 70677f06..baf28515 100644 --- a/FE/error/src/components/EconoCalendar.jsx +++ b/FE/error/src/components/EconoCalendar.jsx @@ -180,8 +180,8 @@ const CalendarContainer = styled.div` } .fc-prev-button:focus, .fc-next-button:focus { - outline: none; /* 기본 아웃라인을 제거합니다. */ - box-shadow: none; /* 추가적인 그림자가 있다면 제거합니다. */ + outline: none; + box-shadow: none; } .fc-today-button { @@ -216,6 +216,8 @@ const CalendarContainer = styled.div` color: #fff; margin-left: 0.5rem; width: 1.53rem; + display: flex; + justify-content: center; } .fc-day-today .fc-daygrid-day-frame { margin-top: 0.2rem; @@ -226,6 +228,7 @@ const CalendarContainer = styled.div` } .fc-daygrid-day-number { margin-top: 0.3rem; + margin-left: -0.1rem; } .fc-toolbar-title { margin-top: 0.2em; From 15ddc6cb412281eca3ea5b573b8823a32772a001 Mon Sep 17 00:00:00 2001 From: hai Date: Thu, 23 May 2024 00:34:20 +0900 Subject: [PATCH 13/21] =?UTF-8?q?feat:=20=EC=B2=AB=20=EB=A0=8C=EB=8D=94?= =?UTF-8?q?=EB=A7=81=20=EB=90=A0=20=EB=95=8C=20=EC=B2=B4=ED=81=AC=EB=90=9C?= =?UTF-8?q?=20=EC=83=81=ED=83=9C=EB=A1=9C=20=EB=A0=8C=EB=8D=94=EB=A7=81=20?= =?UTF-8?q?=EB=90=98=EA=B2=8C=EB=81=94=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/components/{ => SideBar}/ScheduleToggle.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) rename FE/error/src/components/{ => SideBar}/ScheduleToggle.jsx (85%) diff --git a/FE/error/src/components/ScheduleToggle.jsx b/FE/error/src/components/SideBar/ScheduleToggle.jsx similarity index 85% rename from FE/error/src/components/ScheduleToggle.jsx rename to FE/error/src/components/SideBar/ScheduleToggle.jsx index 0522e451..fe6f369e 100644 --- a/FE/error/src/components/ScheduleToggle.jsx +++ b/FE/error/src/components/SideBar/ScheduleToggle.jsx @@ -6,12 +6,16 @@ const ScheduleToggle = ({ color }) => { const handleOnClick = () => { setClicked(!clicked); - console.log(clicked); }; return ( <> - + ); }; From c7ee84a65607aeefd860a0b431b22e1855fb65e6 Mon Sep 17 00:00:00 2001 From: hai Date: Thu, 23 May 2024 02:12:18 +0900 Subject: [PATCH 14/21] =?UTF-8?q?feat:=20axios=20=EC=A0=84=EC=97=AD?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/App.jsx | 1 + FE/error/src/axiosConfig.js | 6 ++++++ FE/error/src/pages/CalendarModify.jsx | 12 ++---------- 3 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 FE/error/src/axiosConfig.js diff --git a/FE/error/src/App.jsx b/FE/error/src/App.jsx index 1c9ab4bb..5ba72297 100644 --- a/FE/error/src/App.jsx +++ b/FE/error/src/App.jsx @@ -2,6 +2,7 @@ import { Routes, Route } from "react-router-dom"; import MainPage from "./pages/MainPage"; import LoginPage from "./pages/LoginPage"; import CalendarModify from "./pages/CalendarModify"; +import "./axiosConfig"; function App() { return ( diff --git a/FE/error/src/axiosConfig.js b/FE/error/src/axiosConfig.js new file mode 100644 index 00000000..907b9aef --- /dev/null +++ b/FE/error/src/axiosConfig.js @@ -0,0 +1,6 @@ +import axios from "axios"; + +// Axios 기본 설정 +axios.defaults.baseURL = import.meta.env.VITE_ERROR_API; +axios.defaults.headers.common["Content-Type"] = "application/json"; +axios.defaults.withCredentials = true; diff --git a/FE/error/src/pages/CalendarModify.jsx b/FE/error/src/pages/CalendarModify.jsx index de2d2298..09d25897 100644 --- a/FE/error/src/pages/CalendarModify.jsx +++ b/FE/error/src/pages/CalendarModify.jsx @@ -48,10 +48,7 @@ const CalendarModify = () => { }; useEffect(() => { - const instance = axios.create({ - baseURL: `${import.meta.env.VITE_ERROR_API}`, - }); - instance.get("/api/calendar/" + selectID).then((res) => { + axios.get("/api/calendar/" + selectID).then((res) => { const event = res.data.data; const title = event.eventName; const startDate = event.eventStartDate.split("T")[0]; @@ -71,10 +68,6 @@ const CalendarModify = () => { }, [selectID]); const modifyData = () => { - const instance = axios.create({ - baseURL: `${import.meta.env.VITE_ERROR_API}`, - }); - const eventData = { eventName: modifyName, eventStartDate: modifyStartDate + "T" + modifyStartTime, @@ -82,8 +75,7 @@ const CalendarModify = () => { eventInfo: modifyInfo, eventPlace: modifyPlace, }; - - instance + axios .put("/api/calendar/" + selectID, eventData) .then((res) => { console.log(res.data); From c6ab4badc355f79f72bcf1427a4bb1029d1f6581 Mon Sep 17 00:00:00 2001 From: hai Date: Thu, 23 May 2024 02:13:10 +0900 Subject: [PATCH 15/21] =?UTF-8?q?feat:=20=EC=9D=BC=EC=A0=95=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EB=B2=84=ED=8A=BC=ED=81=B4=EB=A6=AD=EC=8B=9C=20?= =?UTF-8?q?=EB=A0=8C=EB=8D=94=EB=A7=81=20=EC=95=88=20=EB=90=9C=20=EC=9D=B4?= =?UTF-8?q?=EC=8A=88=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/components/CreateModal.jsx | 51 +++++++++++++------------ 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/FE/error/src/components/CreateModal.jsx b/FE/error/src/components/CreateModal.jsx index 50732862..bacf49d5 100644 --- a/FE/error/src/components/CreateModal.jsx +++ b/FE/error/src/components/CreateModal.jsx @@ -5,6 +5,7 @@ import styled from "styled-components"; import TimeSelect from "./TimeSelect"; import ReactQuill from "react-quill"; import { format, addDays, compareAsc, parseISO } from "date-fns"; +import axios from "axios"; const CreateModal = ({ isOpen, @@ -91,35 +92,35 @@ const CreateModal = ({ setEventPlace(e.target.value); console.log(e.target.value); }; - + function createDate(title, id, startDate, endDate) { + const specificEvent = { + title: title, + id: id, + start: startDate.split("T")[0], + end: endDate.split("T")[0], + color: "#ffc5bf", + }; + console.log(specificEvent); + handleUpdateData(specificEvent); + } const saveData = () => { - const url = `${import.meta.env.VITE_ERROR_API}/api/calendar`; const data = { - eventName, - eventStartDate, - eventEndDate, + eventName: eventName, + eventStartDate: eventStartDate, + eventEndDate: eventEndDate, + eventPlace: eventPlace, eventInfo: eventMemo, - eventPlace, }; - console.log(JSON.stringify(data)); - fetch(url, { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify(data), - credentials: "include", - }) - .then((response) => response.json()) - .then((data) => { - console.log("Success:", data); - onRequestClose(); - handleUpdateData(data); - //window.location.reload(); - }) - .catch((error) => { - console.error("Error:", error); - }); + axios.post("/api/calendar", data).then((res) => { + createDate( + eventName, + res.data.data.eventId, + eventStartDate, + eventEndDate + ); + console.log(res.data.data.eventId); + onRequestClose(); + }); }; return ( From 4787705a93371015536abf19970e9823eaff5de7 Mon Sep 17 00:00:00 2001 From: hai Date: Thu, 23 May 2024 02:14:03 +0900 Subject: [PATCH 16/21] =?UTF-8?q?feat:=20=EC=82=AD=EC=A0=9C=EC=8B=9C=20?= =?UTF-8?q?=ED=98=B8=EC=B6=9C=EB=90=98=EB=8A=94=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/components/CheckModal/DeleteEvent.jsx | 14 ++++++++------ FE/error/src/components/EconoCalendar.jsx | 13 ++++++------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/FE/error/src/components/CheckModal/DeleteEvent.jsx b/FE/error/src/components/CheckModal/DeleteEvent.jsx index b9325c39..de125b8f 100644 --- a/FE/error/src/components/CheckModal/DeleteEvent.jsx +++ b/FE/error/src/components/CheckModal/DeleteEvent.jsx @@ -1,15 +1,17 @@ import { RiDeleteBinLine } from "react-icons/ri"; import axios from "axios"; -const DeleteEvent = ({ events, selectID, handleDelete, onRequestClose }) => { +const DeleteEvent = ({ + selectID, + handleDelete, + onRequestClose, + handleUpdateDeleteData, +}) => { const calendarDelete = () => { - const instance = axios.create({ - baseURL: `${import.meta.env.VITE_ERROR_API}`, - withCredentials: true, - }); - instance + axios .delete("/api/calendar/" + selectID) .then(() => { + handleUpdateDeleteData(selectID); handleDelete(); onRequestClose(); }) diff --git a/FE/error/src/components/EconoCalendar.jsx b/FE/error/src/components/EconoCalendar.jsx index 940fa196..067757d5 100644 --- a/FE/error/src/components/EconoCalendar.jsx +++ b/FE/error/src/components/EconoCalendar.jsx @@ -42,11 +42,7 @@ const EconoCalendar = () => { }; useEffect(() => { - const instance = axios.create({ - baseURL: `${import.meta.env.VITE_ERROR_API}`, - withCredentials: true, - }); - instance + axios .get("/api/calendar/all/2024-04-05") .then((res) => { const fetchedEvents = res.data.data.map((event) => ({ @@ -64,9 +60,12 @@ const EconoCalendar = () => { }, []); const handleUpdateData = (newData) => { - setEvents([...events, newData]); + setEvents((preEvents) => [...preEvents, newData]); }; + const handleUpdateDeleteData = (newData) => { + setEvents(events.filter((event) => event.id !== parseInt(newData))); + }; return ( <> @@ -130,8 +129,8 @@ const EconoCalendar = () => { isOpen={checkModalIsOpen} onRequestClose={() => setCheckModalIsOpen(false)} selectID={selectID} - events={events} handleDelete={handleDelete} + handleUpdateDeleteData={handleUpdateDeleteData} /> Date: Thu, 23 May 2024 02:14:35 +0900 Subject: [PATCH 17/21] =?UTF-8?q?feat:=20props=20=EC=A0=84=EB=8B=AC=20?= =?UTF-8?q?=EB=B0=8F=20=EC=A0=84=EC=97=AD=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/components/CheckModal/CheckCalendar.jsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/FE/error/src/components/CheckModal/CheckCalendar.jsx b/FE/error/src/components/CheckModal/CheckCalendar.jsx index e16df524..70d0c3f1 100644 --- a/FE/error/src/components/CheckModal/CheckCalendar.jsx +++ b/FE/error/src/components/CheckModal/CheckCalendar.jsx @@ -9,13 +9,13 @@ import { MdOutlineLocationOn } from "react-icons/md"; import { MdOutlineAutoAwesomeMotion } from "react-icons/md"; import DeleteEvent from "./DeleteEvent"; import { Link } from "react-router-dom"; - const CheckCalendar = ({ isOpen, onRequestClose, selectID, events, handleDelete, + handleUpdateDeleteData, }) => { const [event, setEvent] = useState({}); @@ -37,10 +37,7 @@ const CheckCalendar = ({ return; } - const instance = axios.create({ - baseURL: `${import.meta.env.VITE_ERROR_API}`, - }); - instance.get("/api/calendar/" + selectID).then((res) => { + axios.get("/api/calendar/" + selectID).then((res) => { createDate( res.data.data.eventName, res.data.data.eventStartDate, @@ -87,6 +84,7 @@ const CheckCalendar = ({ selectID={selectID} handleDelete={handleDelete} onRequestClose={onRequestClose} + handleUpdateDeleteData={handleUpdateDeleteData} /> From 24542d8498e20cb4889514aee74e6200db822fc2 Mon Sep 17 00:00:00 2001 From: hai Date: Thu, 23 May 2024 02:15:00 +0900 Subject: [PATCH 18/21] =?UTF-8?q?chore:=20ScheduleToggle=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/components/SideBar/PublicFilter.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FE/error/src/components/SideBar/PublicFilter.jsx b/FE/error/src/components/SideBar/PublicFilter.jsx index 687f5fd1..b5b8f2f9 100644 --- a/FE/error/src/components/SideBar/PublicFilter.jsx +++ b/FE/error/src/components/SideBar/PublicFilter.jsx @@ -1,5 +1,5 @@ import styled from "styled-components"; -import ScheduleToggle from "../ScheduleToggle"; +import ScheduleToggle from "./ScheduleToggle"; const PublicFilter = () => { return ( From 82681fa5eaef0ef1df889a25a91af79bd3c98731 Mon Sep 17 00:00:00 2001 From: hai Date: Thu, 23 May 2024 02:19:32 +0900 Subject: [PATCH 19/21] =?UTF-8?q?feat:=20=EC=9D=B8=ED=92=8B=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=EB=B0=95=EC=8A=A4=20=EC=97=90=EB=9F=AC=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/components/SideBar/ScheduleToggle.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FE/error/src/components/SideBar/ScheduleToggle.jsx b/FE/error/src/components/SideBar/ScheduleToggle.jsx index fe6f369e..fb4afc10 100644 --- a/FE/error/src/components/SideBar/ScheduleToggle.jsx +++ b/FE/error/src/components/SideBar/ScheduleToggle.jsx @@ -14,7 +14,7 @@ const ScheduleToggle = ({ color }) => { type="checkbox" onClick={handleOnClick} color={color} - checked={clicked} + defaultChecked={clicked} /> ); From debdc1d99a682c8c15c560b23bec61f1cfe633c5 Mon Sep 17 00:00:00 2001 From: hai Date: Thu, 23 May 2024 02:34:45 +0900 Subject: [PATCH 20/21] =?UTF-8?q?chore:=20=EC=BD=98=EC=86=94=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/src/components/CreateModal.jsx | 3 --- FE/error/src/pages/CalendarModify.jsx | 1 - 2 files changed, 4 deletions(-) diff --git a/FE/error/src/components/CreateModal.jsx b/FE/error/src/components/CreateModal.jsx index bacf49d5..49867f66 100644 --- a/FE/error/src/components/CreateModal.jsx +++ b/FE/error/src/components/CreateModal.jsx @@ -90,7 +90,6 @@ const CreateModal = ({ const handlePlaceChange = (e) => { setEventPlace(e.target.value); - console.log(e.target.value); }; function createDate(title, id, startDate, endDate) { const specificEvent = { @@ -100,7 +99,6 @@ const CreateModal = ({ end: endDate.split("T")[0], color: "#ffc5bf", }; - console.log(specificEvent); handleUpdateData(specificEvent); } const saveData = () => { @@ -118,7 +116,6 @@ const CreateModal = ({ eventStartDate, eventEndDate ); - console.log(res.data.data.eventId); onRequestClose(); }); }; diff --git a/FE/error/src/pages/CalendarModify.jsx b/FE/error/src/pages/CalendarModify.jsx index 09d25897..1495e7be 100644 --- a/FE/error/src/pages/CalendarModify.jsx +++ b/FE/error/src/pages/CalendarModify.jsx @@ -78,7 +78,6 @@ const CalendarModify = () => { axios .put("/api/calendar/" + selectID, eventData) .then((res) => { - console.log(res.data); goBack(); }) .catch((error) => { From e1a1fec71cf0e7cc54f344540ca233be419300ae Mon Sep 17 00:00:00 2001 From: kanghaeun Date: Thu, 23 May 2024 03:16:43 +0900 Subject: [PATCH 21/21] =?UTF-8?q?chore:=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=EB=AC=B8=EC=84=9C=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/error/README.md | 8 -------- FE/kanghaeun.md | 1 - FE/test.js | 1 - "FE/\352\263\275\353\257\274\354\244\200.md" | 1 - 4 files changed, 11 deletions(-) delete mode 100644 FE/error/README.md delete mode 100644 FE/kanghaeun.md delete mode 100644 FE/test.js delete mode 100644 "FE/\352\263\275\353\257\274\354\244\200.md" diff --git a/FE/error/README.md b/FE/error/README.md deleted file mode 100644 index f768e33f..00000000 --- a/FE/error/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# React + Vite - -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. - -Currently, two official plugins are available: - -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh diff --git a/FE/kanghaeun.md b/FE/kanghaeun.md deleted file mode 100644 index 5fde6d41..00000000 --- a/FE/kanghaeun.md +++ /dev/null @@ -1 +0,0 @@ -안녕하세요 저는 강하은입니다 같이 이번 프로젝트 시작하게 되어서 기쁘네요! diff --git a/FE/test.js b/FE/test.js deleted file mode 100644 index a50e789f..00000000 --- a/FE/test.js +++ /dev/null @@ -1 +0,0 @@ -console.log("hello world!"); diff --git "a/FE/\352\263\275\353\257\274\354\244\200.md" "b/FE/\352\263\275\353\257\274\354\244\200.md" deleted file mode 100644 index 1eff4932..00000000 --- "a/FE/\352\263\275\353\257\274\354\244\200.md" +++ /dev/null @@ -1 +0,0 @@ -안녕하세요 404팀에서 ERROR 프로젝트 프론트엔드 맡고있는 곽민준입니다