Skip to content

Commit

Permalink
[#20] refact : sideBookmarkList에서 bookmarkList로 이름 변경 및 category 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
choibumsu committed Feb 23, 2021
1 parent b2062f9 commit 9ebdae7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
26 changes: 17 additions & 9 deletions public/data/data.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,60 @@
{
"sideBookmarkList": [
"bookmarkList": [
{
"id": 1,
"name": "중앙대학교",
"url": "https://www.cau.ac.kr/index.do",
"image": "/images/cau-logo.png"
"image": "/images/cau-logo.png",
"category": "side"
},
{
"id": 2,
"name": "중앙대학교",
"url": "https://www.cau.ac.kr/index.do",
"image": "/images/cau-logo.png"
"image": "/images/cau-logo.png",
"category": "side"
},
{
"id": 3,
"name": "중앙대학교",
"url": "https://www.cau.ac.kr/index.do",
"image": "/images/cau-logo.png"
"image": "/images/cau-logo.png",
"category": "side"
},
{
"id": 4,
"name": "중앙대학교",
"url": "https://www.cau.ac.kr/index.do",
"image": "/images/cau-logo.png"
"image": "/images/cau-logo.png",
"category": "side"
},
{
"id": 5,
"name": "중앙대학교",
"url": "https://www.cau.ac.kr/index.do",
"image": "/images/cau-logo.png"
"image": "/images/cau-logo.png",
"category": "side"
},
{
"id": 6,
"name": "중앙대학교",
"url": "https://www.cau.ac.kr/index.do",
"image": "/images/cau-logo.png"
"image": "/images/cau-logo.png",
"category": "side"
},
{
"id": 7,
"name": "중앙대학교",
"url": "https://www.cau.ac.kr/index.do",
"image": "/images/cau-logo.png"
"image": "/images/cau-logo.png",
"category": "side"
},
{
"id": 8,
"name": "중앙대학교",
"url": "https://www.cau.ac.kr/index.do",
"image": "/images/cau-logo.png"
"image": "/images/cau-logo.png",
"category": "side"
}
],
"professorsList": [
Expand Down
4 changes: 2 additions & 2 deletions src/components/SideMenuBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import './style.scss'

export const SideMenuBar: React.FC = () => {
const {
store: { sideBookmarkList },
store: { bookmarkList },
} = useStore()
const [isShow, setIsShow] = useState(false)

Expand All @@ -22,7 +22,7 @@ export const SideMenuBar: React.FC = () => {
}}
>
<div className="bookmark-container">
{sideBookmarkList.map((bookmark) => (
{bookmarkList.map((bookmark) => (
<Bookmark {...bookmark} key={bookmark.id}></Bookmark>
))}
</div>
Expand Down
1 change: 1 addition & 0 deletions src/components/common/Bookmark/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export type BookmarkProps = {
name: string
url: string
image: string
category: string
}

export const Bookmark: React.FC<BookmarkProps> = ({ id, name, url, image }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/store/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Toggle = {
}

export type StoreType = {
sideBookmarkList: BookmarkProps[]
bookmarkList: BookmarkProps[]
todoSectionList: TodoSectionProps[]
todoList: TodoProps[]
toggleConfig: Toggle
Expand Down

0 comments on commit 9ebdae7

Please sign in to comment.