diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-14 22:42:52 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-14 22:42:52 +0300 |
commit | c311c538a3442aed8d77449736f28be66feea57c (patch) | |
tree | e555dd765c690e3e269996d00a08814afad700d4 /src/components/Feed | |
parent | 14b70c34a1b88c83e89f483399debd60560ed70b (diff) | |
download | which-ui-c311c538a3442aed8d77449736f28be66feea57c.tar.gz |
feat: configure navigation
Diffstat (limited to 'src/components/Feed')
-rw-r--r-- | src/components/Feed/Feed.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/Feed/Feed.tsx b/src/components/Feed/Feed.tsx index 8dc3ec1..3b8e16f 100644 --- a/src/components/Feed/Feed.tsx +++ b/src/components/Feed/Feed.tsx @@ -5,6 +5,7 @@ import PollCard from '../PollCard/PollCard'; interface PropTypes { polls: Poll[]; + navigate: (prefix: string, id: string) => void; } const useStyles = makeStyles(theme => ({ @@ -15,12 +16,12 @@ const useStyles = makeStyles(theme => ({ } })); -const Feed: React.FC<PropTypes> = ({ polls }) => { +const Feed: React.FC<PropTypes> = ({ polls, navigate }) => { const classes = useStyles(); return ( <div className={classes.root}> - {polls.map(poll => <PollCard poll={poll} key={poll._id} />)} + {polls.map(poll => <PollCard poll={poll} key={poll._id} navigate={navigate} />)} </div> ); }; |