From a3c7536e5fb361589a1325345eab710d5d6ba187 Mon Sep 17 00:00:00 2001 From: junglesub Date: Wed, 26 Jan 2022 16:08:13 +0900 Subject: [PATCH] [#48] feat: front design add numbers --- .../components/SearchSection/LectureCard.js | 80 ++++++++++++------- client/src/models/Lecture.js | 2 +- 2 files changed, 53 insertions(+), 29 deletions(-) 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;