From 14904bff99c0bcb4ef4c896581b98b40d835e038 Mon Sep 17 00:00:00 2001 From: Vladimir Volek Date: Wed, 10 Oct 2018 13:58:15 +0200 Subject: [PATCH] Fixed component --- src/components/Link/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/Link/index.js b/src/components/Link/index.js index de946762..708015d4 100644 --- a/src/components/Link/index.js +++ b/src/components/Link/index.js @@ -47,7 +47,7 @@ const StyledNavLink = styled(NavLink)` class Link extends Component { render() { - const shouldRenderRouterLink = !!this.this.to; + const shouldRenderRouterLink = this.props.to; let LinkComponent; if (shouldRenderRouterLink) { LinkComponent = ( @@ -55,7 +55,8 @@ class Link extends Component { isGreen={this.props.isGreen} isGray={this.props.isGray} to={this.props.to} - />); + >{this.props.children} + ); } else { LinkComponent = ( ); } - return (); + + return LinkComponent; } }