-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: filter와 filterList 구분을 통해서 영속성을 List에만 부여(#15)
- Loading branch information
Showing
17 changed files
with
289 additions
and
570 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Box, Typography, Button } from '@mui/material'; | ||
import Link from 'next/link'; | ||
import { setComponentNum } from 'src/redux/slices/component'; | ||
import { dispatch } from 'src/redux/store'; | ||
|
||
export default function TitleAndRefreshButton({ type }) { | ||
return ( | ||
<Box sx={{ display: 'flex', justifyContent: 'space-between' }}> | ||
<Typography color="primary" variant="h5" sx={{ mb: 2 }}> | ||
{type} {' 리스트'} | ||
</Typography> | ||
|
||
<Link href="/"> | ||
<Button | ||
variant="outlined" | ||
sx={{ padding: '2px 10px' }} | ||
onClick={() => dispatch(setComponentNum(0))} | ||
> | ||
필터링 새로고침 버튼 | ||
</Button> | ||
</Link> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { createSlice } from '@reduxjs/toolkit'; | ||
|
||
const initialState = { | ||
categoryList: [], | ||
semesterList: [], // 애매 | ||
itemList: [], | ||
studentList: [], | ||
}; | ||
|
||
const slice = createSlice({ | ||
name: 'filterList', | ||
initialState, | ||
reducers: { | ||
setCategoryList: (state, action) => { | ||
state.categoryList = action.payload; | ||
}, | ||
setSemesterList: (state, action) => { | ||
state.semesterList = action.payload; | ||
}, | ||
setItemList: (state, action) => { | ||
state.itemList = action.payload; | ||
}, | ||
setStudentList: (state, action) => { | ||
state.studentList = action.payload; | ||
}, | ||
}, | ||
}); | ||
|
||
// Reducer | ||
export const { setCategoryList, setSemesterList, setItemList, setStudentList } = slice.actions; | ||
export default slice.reducer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters