diff --git a/src/components/board/MileageRegister.tsx b/src/components/board/MileageRegister.tsx index a762b88..e85a64e 100644 --- a/src/components/board/MileageRegister.tsx +++ b/src/components/board/MileageRegister.tsx @@ -218,5 +218,5 @@ export default function MileageRegister() { ), ]; - return ; + return ; } diff --git a/src/components/board/MileageResult.tsx b/src/components/board/MileageResult.tsx index 83c4cda..bfd09b1 100644 --- a/src/components/board/MileageResult.tsx +++ b/src/components/board/MileageResult.tsx @@ -188,5 +188,5 @@ export default function MileageResult() { ), ]; - return ; + return ; } diff --git a/src/components/board/MileageSemesterItem.tsx b/src/components/board/MileageSemesterItem.tsx index 9a5e29e..c29bc16 100644 --- a/src/components/board/MileageSemesterItem.tsx +++ b/src/components/board/MileageSemesterItem.tsx @@ -24,6 +24,10 @@ import { } from 'src/assets/data/fields'; import SWModal from '../common/modal/SWModal'; import { EDITITEM } from 'src/assets/data/modal/modals'; +import { useSelector, dispatch } from 'src/redux/store'; +import { useDispatch } from 'react-redux'; +import { useEffect } from 'react'; +import { setMileageSemesterList } from 'src/redux/slices/data'; /** * @component [마일리지 학기별 항목] 게시판 @@ -233,5 +237,12 @@ export default function MileageSemesterItem() { ), ]; - return ; + const data = useSelector((state) => state.data.mileageSemesterList); + const dispatch = useDispatch(); + + useEffect(() => { + dispatch(setMileageSemesterList(rows)); + }, []); + + return ; } diff --git a/src/components/board/MileageView.tsx b/src/components/board/MileageView.tsx index 760df08..136b3f5 100644 --- a/src/components/board/MileageView.tsx +++ b/src/components/board/MileageView.tsx @@ -217,5 +217,5 @@ export default function MileageView() { ), ]; - return ; + return ; } diff --git a/src/components/board/RegisterManage.tsx b/src/components/board/RegisterManage.tsx index 6a79474..3eba127 100644 --- a/src/components/board/RegisterManage.tsx +++ b/src/components/board/RegisterManage.tsx @@ -223,5 +223,5 @@ export default function RegisterManage() { ), ]; - return ; + return ; } diff --git a/src/components/board/StudentManage.tsx b/src/components/board/StudentManage.tsx index c7cb65c..edc724d 100644 --- a/src/components/board/StudentManage.tsx +++ b/src/components/board/StudentManage.tsx @@ -223,5 +223,5 @@ export default function StudentManage() { ), ]; - return ; + return ; } diff --git a/src/components/board/UserManage.tsx b/src/components/board/UserManage.tsx index 0eff19b..54ae862 100644 --- a/src/components/board/UserManage.tsx +++ b/src/components/board/UserManage.tsx @@ -104,5 +104,5 @@ export default function UserManage() { createData(5, '김광', '21800450', '관리자', '20(2023-08-22)'), ]; - return ; + return ; } diff --git a/src/redux/slices/data.js b/src/redux/slices/data.js index 2fa1d28..32d6c13 100644 --- a/src/redux/slices/data.js +++ b/src/redux/slices/data.js @@ -3,6 +3,7 @@ import { createSlice } from '@reduxjs/toolkit'; const initialState = { mileageCategoryList: [], mileageGlobalList: [], + mileageSemesterList: [], }; const slice = createSlice({ @@ -15,9 +16,13 @@ const slice = createSlice({ setMileageGlobalList: (state, action) => { state.mileageGlobalList = action.payload; }, + setMileageSemesterList: (state, action) => { + state.mileageSemesterList = action.payload; + }, }, }); // Reducer -export const { setMileageCategoryList, setMileageGlobalList } = slice.actions; +export const { setMileageCategoryList, setMileageGlobalList, setMileageSemesterList } = + slice.actions; export default slice.reducer;