From 47b7e5a9c9abbf755fc45a3dd7873a927335f0e2 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 23 Mar 2021 18:40:55 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Make=20BaseLinks=20strict?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BaseLink/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/BaseLink/index.js b/src/components/BaseLink/index.js index 03abe55..a6f9751 100644 --- a/src/components/BaseLink/index.js +++ b/src/components/BaseLink/index.js @@ -5,7 +5,10 @@ import {Link, useRouteMatch} from "react-router-dom" export default function BaseLink({children, className, href, disabled, ...props}) { - const locationMatch = useRouteMatch(href) + const locationMatch = useRouteMatch({ + path: href, + strict: true, + }) const activeClassNames = useBluelibClassNames("style-bold", className) const disabledClassNames = useBluelibClassNames("element-anchor status-disabled", className)