diff options
author | ilyayudovin <ilyayudovin123@gmail.com> | 2020-06-27 15:34:32 +0300 |
---|---|---|
committer | ilyayudovin <ilyayudovin123@gmail.com> | 2020-06-27 15:34:32 +0300 |
commit | 562f675297e03f8abb16af0a5506c51ba91e166a (patch) | |
tree | 0535bdd2825d980a7ceecfbbe04431beeb41dc79 | |
parent | 28a0027e212cfe2b3f5d397464dbbfe14a5a186c (diff) | |
download | which-ui-562f675297e03f8abb16af0a5506c51ba91e166a.tar.gz |
button as a component
-rw-r--r-- | src/components/Highlight/Highlight.tsx | 2 | ||||
-rw-r--r-- | src/components/UserStatus/UserStatus.tsx | 29 | ||||
-rw-r--r-- | src/pages/ProfilePage/ProfileInfo.tsx | 9 |
3 files changed, 4 insertions, 36 deletions
diff --git a/src/components/Highlight/Highlight.tsx b/src/components/Highlight/Highlight.tsx index 71764e2..8e11c34 100644 --- a/src/components/Highlight/Highlight.tsx +++ b/src/components/Highlight/Highlight.tsx @@ -13,7 +13,7 @@ const useStyles = makeStyles({ menuButton: { width: 200, height: 50, - textAlign: 'center' + textAlign: 'center', }, menuNumber: { fontWeight: 800, diff --git a/src/components/UserStatus/UserStatus.tsx b/src/components/UserStatus/UserStatus.tsx deleted file mode 100644 index 338b5d1..0000000 --- a/src/components/UserStatus/UserStatus.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React, {useState} from 'react'; -import {makeStyles} from '@material-ui/core/styles'; - -const useStyles = makeStyles({ - root: { - position: 'relative' - }, - status: { - textAlign: 'center', - color: 'darkgray' - }, -}); - - -const UserStatus: React.FC = () => { - const classes = useStyles(); - - const changeStatus = () => { - - }; - - return ( - <div className={classes.status} onClick={changeStatus}> - I am not alcoholic - </div> - ); -}; - -export default UserStatus; diff --git a/src/pages/ProfilePage/ProfileInfo.tsx b/src/pages/ProfilePage/ProfileInfo.tsx index a445b51..b68075f 100644 --- a/src/pages/ProfilePage/ProfileInfo.tsx +++ b/src/pages/ProfilePage/ProfileInfo.tsx @@ -6,7 +6,6 @@ import CameraAltIcon from '@material-ui/icons/CameraAlt'; import MoreMenu from "./MoreMenu"; import {patch} from '../../requests'; import Highlight from "../../components/Highlight/Highlight"; -import UserStatus from "../../components/UserStatus/UserStatus"; interface PropTypes { @@ -34,7 +33,6 @@ const useStyles = makeStyles({ display: 'flex', width: '100%', height: 50, - borderBottom: '1px solid lightgray', margin: '50px 0' }, menuButton: { @@ -131,11 +129,10 @@ const ProfileInfo: React.FC<PropTypes> = ({user, logOut,savedPolls, totalVotes}) <div className={classes.name}> {user?.username} </div> - <UserStatus /> <div className={classes.profileMenu}> - <Highlight text="polls" value={savedPolls}/> - <Highlight text="since" value={user?.createdAt.toString().substring(0,10).replace(/-/g, '.')}/> - <Highlight text="total" value={totalVotes}/> + <Highlight text="Polls" value={savedPolls}/> + <Highlight text="Since" value={user?.createdAt.toString().substring(0,10).replace(/-/g, '.')}/> + <Highlight text="Total" value={totalVotes}/> </div> </div> ); |