remove useless mock

This commit is contained in:
Baorong Li
2018-09-09 08:53:06 +08:00
parent ae8aba68f2
commit 417215cfcc
5 changed files with 7 additions and 48 deletions
+2 -2
View File
@@ -20,14 +20,14 @@ const countUpProps = {
separator: ',',
}
function Cpu ({ usage, space, cpu, data }) {
function Cpu ({ usage=0, space=0, cpu=0, data }) {
return (
<div className={styles.cpu}>
<div className={styles.number}>
<div className={styles.item}>
<p>usage</p>
<p>
<CountUp end={usage || 0} suffix="GB" {...countUpProps} />
<CountUp end={usage} suffix="GB" {...countUpProps} />
</p>
</div>
<div className={styles.item}>
+2 -6
View File
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { Button } from 'antd'
import { Button, Icon } from 'antd'
import CountUp from 'react-countup'
import { color } from 'utils'
import styles from './user.less'
@@ -18,12 +18,8 @@ function User ({ avatar, name, email, sales, sold }) {
<div className={styles.user}>
<div className={styles.header}>
<div className={styles.headerinner}>
<div
className={styles.avatar}
style={{ backgroundImage: `url(${avatar})` }}
/>
<Icon className={styles.avatar} type="github" theme="outlined" />
<h5 className={styles.name}>{name}</h5>
<p>{email}</p>
</div>
</div>
<div className={styles.number}>
+2 -3
View File
@@ -16,7 +16,7 @@
&::after {
content: '';
background: #caa2d6;
background: #c5bec7;
position: absolute;
width: 100%;
height: 200px;
@@ -27,8 +27,7 @@
}
.avatar {
width: 64px;
height: 64px;
font-size: 48px;
background-position: center;
background-size: cover;
border-radius: 50%;