diff --git a/client/src/components/SearchSection/LectureCard.js b/client/src/components/SearchSection/LectureCard.js index 80a2f65..e7c997d 100644 --- a/client/src/components/SearchSection/LectureCard.js +++ b/client/src/components/SearchSection/LectureCard.js @@ -1,6 +1,6 @@ import React from 'react'; import { Switch, Case, Default } from 'react-if'; -import { Box, IconButton, Tooltip, Typography, makeStyles } from '@material-ui/core'; +import { Box, IconButton, Tooltip, Typography, makeStyles, Button } from '@material-ui/core'; import BookmarkIcon from '@material-ui/icons/Bookmark'; import AddIcon from '@material-ui/icons/Add'; @@ -67,6 +67,18 @@ const useStyles = makeStyles((theme) => ({ marginLeft: 'auto', paddingRight: '10px', }, + + buttonItem: { + lineHeight: '100%', + }, + + buttonEndIcon: { + marginRight: '0', + }, + + countText: { + lineHeight: '100%', + }, })); export default function LectureCard({ @@ -96,33 +108,45 @@ export default function LectureCard({ const DefaultButtonGroup = () => { return ( - - - - - - - {lecture.isBookmarked ? ( - - - - ) : ( - - - - )} - - - {lecture.isSpike ? ( - - - - ) : ( - - - - )} - + + + + + + + + + ); }; diff --git a/client/src/models/Lecture.js b/client/src/models/Lecture.js index 0e7670c..5757480 100644 --- a/client/src/models/Lecture.js +++ b/client/src/models/Lecture.js @@ -2,7 +2,7 @@ import { Axios } from '../lib/axios'; import { isIn } from '../utils/helper'; export default class Lecture { - constructor(raw, bookmarks = [], spikes = []) { + constructor(raw, bookmarks = [], spikes = [], counts = {}) { this.id = raw.id; this.gubun = raw.gubun; this.code = raw.code;