aboutsummaryrefslogtreecommitdiff
path: root/src/components/PollCard
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-30 00:41:09 +0300
committereug-vs <eug-vs@keemail.me>2020-06-30 00:41:09 +0300
commit1499c0126d1a7a2377b0267b761479100c636ee9 (patch)
tree5d48eea7b8dffcac324034703ebc4e30448d75c6 /src/components/PollCard
parentaa63dea15c71ab014b4b57010574c7abf1f9628b (diff)
downloadwhich-ui-1499c0126d1a7a2377b0267b761479100c636ee9.tar.gz
feat!: create useNavigate hook
Diffstat (limited to 'src/components/PollCard')
-rw-r--r--src/components/PollCard/PollCard.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/components/PollCard/PollCard.tsx b/src/components/PollCard/PollCard.tsx
index 156315a..2a23522 100644
--- a/src/components/PollCard/PollCard.tsx
+++ b/src/components/PollCard/PollCard.tsx
@@ -13,7 +13,6 @@ import { post } from '../../requests';
interface PropTypes {
initialPoll: Poll;
- navigate: (prefix: string, id: string) => void;
}
const DATE_FORMAT = {
@@ -54,7 +53,7 @@ const useStyles = makeStyles(theme => ({
}
}));
-const PollCard: React.FC<PropTypes> = ({ initialPoll, navigate }) => {
+const PollCard: React.FC<PropTypes> = ({ initialPoll }) => {
const [poll, setPoll] = useState<Poll>(initialPoll);
const classes = useStyles();
const { author, contents: { left, right }, vote } = poll;
@@ -87,7 +86,7 @@ const PollCard: React.FC<PropTypes> = ({ initialPoll, navigate }) => {
return (
<Card className={classes.root}>
- <UserStrip user={author} info={date} navigate={navigate} />
+ <UserStrip user={author} info={date} />
<div className={classes.imagesBlock}>
<CardActionArea onDoubleClick={handleLeft}>
<CardMedia