aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/PollCard/PercentageBar.tsx4
-rw-r--r--src/components/PollCard/PollCard.tsx19
-rw-r--r--src/index.tsx21
-rw-r--r--src/pages/ProfilePage/ProfilePage.tsx2
4 files changed, 23 insertions, 23 deletions
diff --git a/src/components/PollCard/PercentageBar.tsx b/src/components/PollCard/PercentageBar.tsx
index bf88815..6a50a9e 100644
--- a/src/components/PollCard/PercentageBar.tsx
+++ b/src/components/PollCard/PercentageBar.tsx
@@ -6,7 +6,7 @@ interface PropTypes {
which: 'left' | 'right';
}
-const useStyles = makeStyles(theme => ({
+const useStyles = makeStyles({
root: {
position: 'absolute',
color: 'white',
@@ -20,7 +20,7 @@ const useStyles = makeStyles(theme => ({
right: {
right: 30
}
-}));
+});
const PercentageBar: React.FC<PropTypes> = ({ value, which }) => {
const classes = useStyles();
diff --git a/src/components/PollCard/PollCard.tsx b/src/components/PollCard/PollCard.tsx
index 7f587f3..23dc342 100644
--- a/src/components/PollCard/PollCard.tsx
+++ b/src/components/PollCard/PollCard.tsx
@@ -5,8 +5,7 @@ import {
CardActionArea,
CardMedia,
Avatar,
- CardHeader,
-Link
+ CardHeader
} from '@material-ui/core/';
import { Poll } from '../../types';
import PercentageBar from './PercentageBar';
@@ -28,7 +27,7 @@ const useStyles = makeStyles(theme => ({
},
imagesBlock: {
display: 'flex'
- },
+ }
}));
@@ -47,14 +46,12 @@ const PollCard: React.FC<PropTypes> = ({ poll, navigate }) => {
<Card className={classes.root}>
<CardHeader
avatar={(
- <Link href="#">
- <Avatar
- aria-label="avatar"
- src={author.avatarUrl}
- alt={author.name[0].toUpperCase()}
- onClick={handleNavigate}
- />
- </Link>
+ <Avatar
+ aria-label="avatar"
+ src={author.avatarUrl}
+ alt={author.name[0].toUpperCase()}
+ onClick={handleNavigate}
+ />
)}
title={author.name}
/>
diff --git a/src/index.tsx b/src/index.tsx
index d7326cb..876491d 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -39,14 +39,17 @@ const App: React.FC = () => {
const classes = useStyles();
const navigate = (prefix: string, id?: string): void => {
- if (prefix === 'profile' && !id && !user) setPage({
- prefix: 'auth',
- id: ''
- });
- else setPage({
- prefix,
- id: (id || user?._id || '')
- });
+ if (prefix === 'profile' && !id && !user) {
+ setPage({
+ prefix: 'auth',
+ id: ''
+ });
+ } else {
+ setPage({
+ prefix,
+ id: (id || user?._id || '')
+ });
+ }
};
const logOut = () => {
@@ -71,7 +74,7 @@ const App: React.FC = () => {
<div className={classes.root}>
{ page.prefix === 'profile' && <ProfilePage logOut={logOut} id={page.id} navigate={navigate} /> }
{ page.prefix === 'feed' && <FeedPage navigate={navigate} /> }
- { page.prefix === 'auth' && <AuthPage setUser={setUser} navigate={navigate}/> }
+ { page.prefix === 'auth' && <AuthPage setUser={setUser} navigate={navigate} /> }
</div>
</ThemeProvider>
);
diff --git a/src/pages/ProfilePage/ProfilePage.tsx b/src/pages/ProfilePage/ProfilePage.tsx
index 46637cb..0f5fb2b 100644
--- a/src/pages/ProfilePage/ProfilePage.tsx
+++ b/src/pages/ProfilePage/ProfilePage.tsx
@@ -1,4 +1,4 @@
-import React, { useState,useEffect } from 'react';
+import React, { useState, useEffect } from 'react';
import { User, Poll } from '../../types';
import ProfileInfo from './ProfileInfo';
import Feed from '../../components/Feed/Feed';