diff --git a/FE/error/src/components/scheduleCreate/CreateModal.jsx b/FE/error/src/components/scheduleCreate/CreateModal.jsx
index cfa4085..7c15f6c 100644
--- a/FE/error/src/components/scheduleCreate/CreateModal.jsx
+++ b/FE/error/src/components/scheduleCreate/CreateModal.jsx
@@ -1,5 +1,5 @@
import { useState, useEffect } from "react";
-import { format, addDays, compareAsc, parseISO } from "date-fns";
+import { format, addDays } from "date-fns";
import axios from "axios";
import Modal from "react-modal";
import styled from "styled-components";
@@ -66,7 +66,7 @@ const CreateModal = ({
};
const isFilterSelected = () => {
- return selectedFilter && selectedFilter.category && selectedFilter.filter;
+ return selectedFilter && selectedFilter.category && selectedFilter.filterId;
};
const handleTitleChange = (event) => {
@@ -128,13 +128,13 @@ const CreateModal = ({
};
const handleFilterSelect = (category, filter) => {
- setSelectedFilter({ category, filter });
+ setSelectedFilter({ category, ...filter });
setActiveDropdown(null);
};
const getButtonContent = (category) => {
if (selectedFilter && selectedFilter.category === category) {
- return selectedFilter.filter;
+ return selectedFilter.filterName;
}
switch (category) {
case "public":
@@ -170,18 +170,16 @@ const CreateModal = ({
eventEndDate: eventEndDate,
eventPlace: eventPlace,
eventInfo: eventMemo,
- scheduleType: selectedFilter.category,
- filterName: selectedFilter.filter,
+ scheduleType: selectedFilter.category.toUpperCase(),
+ filter: {
+ filterId: selectedFilter.filterId,
+ },
};
axios
- .post(
- "/api/calendar",
- {
- headers: { Authorization: `Bearer ${storedToken}` },
- },
- data
- )
+ .post("/api/calendar", data, {
+ headers: { Authorization: `Bearer ${storedToken}` },
+ })
.then((res) => {
createDate(
eventName,
@@ -227,12 +225,22 @@ const CreateModal = ({
{category === "public" && (
<>
handleFilterSelect(category, "공식행사")}
+ onClick={() =>
+ handleFilterSelect(category, {
+ filterId: "public1",
+ filterName: "공식행사",
+ })
+ }
>
공식행사
handleFilterSelect(category, "주간발표")}
+ onClick={() =>
+ handleFilterSelect(category, {
+ filterId: "public2",
+ filterName: "주간발표",
+ })
+ }
>
주간발표
@@ -242,13 +250,21 @@ const CreateModal = ({
<>
- handleFilterSelect(category, "28기 신입모집 TF")
+ handleFilterSelect(category, {
+ filterId: "group1",
+ filterName: "28기 신입모집 TF",
+ })
}
>
28기 신입모집 TF
handleFilterSelect(category, "행사부")}
+ onClick={() =>
+ handleFilterSelect(category, {
+ filterId: "group2",
+ filterName: "행사부",
+ })
+ }
>
행사부
@@ -258,9 +274,7 @@ const CreateModal = ({
privateFilters.map((filter) => (
- handleFilterSelect(category, filter.filterName)
- }
+ onClick={() => handleFilterSelect(category, filter)}
>
{filter.filterName}
diff --git a/FE/error/src/pages/MainPage.jsx b/FE/error/src/pages/MainPage.jsx
index 5fa8b0d..69da177 100644
--- a/FE/error/src/pages/MainPage.jsx
+++ b/FE/error/src/pages/MainPage.jsx
@@ -97,7 +97,7 @@ const CalendarPage = styled.div`
const LineBox = styled.div`
width: 100%;
- height: 1.5rem;
+ height: 1.25rem;
border: 1px solid #ddd;
border-right: none;
margin-top: 0.65rem;