From 5a7d438b309769b351091e8633400cc5e7a4999d Mon Sep 17 00:00:00 2001 From: ohinhyuk <8156217@naver.com> Date: Fri, 25 Aug 2023 16:08:47 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=ED=95=99=EA=B8=B0=20=ED=95=84=ED=84=B0?= =?UTF-8?q?=EB=A7=81=20=EC=83=81=ED=83=9C=20Reducer=EC=97=90=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80(#15)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/redux/slices/filter.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/redux/slices/filter.js b/src/redux/slices/filter.js index e524e03..4d4819c 100644 --- a/src/redux/slices/filter.js +++ b/src/redux/slices/filter.js @@ -2,6 +2,7 @@ import { createSlice } from '@reduxjs/toolkit'; const initialState = { category: '', + semester: '', }; const slice = createSlice({ @@ -12,7 +13,13 @@ const slice = createSlice({ state.category = action.payload; }, clearCategory: (state) => { - state.category = ''; + state.category = undefined; + }, + setSemester: (state, action) => { + state.semester = action.payload; + }, + clearSemester: (state) => { + state.semester = undefined; }, }, });