From 67641b402f99765f038b0e69431c8a9989cee001 Mon Sep 17 00:00:00 2001 From: Tom Robinson <tlrobinson@gmail.com> Date: Tue, 3 Jan 2017 14:10:43 -0800 Subject: [PATCH] Make collection buttons real links. Resolves #4017 --- .../metabase/questions/components/CollectionButtons.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/metabase/questions/components/CollectionButtons.jsx b/frontend/src/metabase/questions/components/CollectionButtons.jsx index 0fb649942e7..38a60fd008f 100644 --- a/frontend/src/metabase/questions/components/CollectionButtons.jsx +++ b/frontend/src/metabase/questions/components/CollectionButtons.jsx @@ -31,7 +31,9 @@ class CollectionButton extends Component { render () { const { id, name, color, slug, isAdmin, push } = this.props; return ( - <div + <Link + to={`/questions/collections/${slug}`} + className="no-decoration" onMouseEnter={() => this.setState({ hovered: true })} onMouseLeave={() => this.setState({ hovered: false })} > @@ -43,7 +45,6 @@ class CollectionButton extends Component { borderRadius: 10, backgroundColor: this.state.hovered ? color : '#fafafa' }} - onClick={() => push(`/questions/collections/${slug}`)} > { isAdmin && <div className="absolute top right mt2 mr2 hover-child"> @@ -61,7 +62,7 @@ class CollectionButton extends Component { /> <h3>{ name }</h3> </div> - </div> + </Link> ) } } -- GitLab