From 1499c0126d1a7a2377b0267b761479100c636ee9 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 30 Jun 2020 00:41:09 +0300 Subject: feat!: create useNavigate hook --- src/components/PollCard/PollCard.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/components/PollCard') 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 = ({ initialPoll, navigate }) => { +const PollCard: React.FC = ({ initialPoll }) => { const [poll, setPoll] = useState(initialPoll); const classes = useStyles(); const { author, contents: { left, right }, vote } = poll; @@ -87,7 +86,7 @@ const PollCard: React.FC = ({ initialPoll, navigate }) => { return ( - +