From e71b2365200d21c23db54223b74b1e814b78abcb Mon Sep 17 00:00:00 2001 From: malmen237 Date: Thu, 2 May 2024 11:59:44 +0200 Subject: [PATCH] fix: removed btn-disable when user is on root --- .../navigate-to-root-button/navigate-to-root-button.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/components/navigate-to-root-button/navigate-to-root-button.tsx b/src/components/navigate-to-root-button/navigate-to-root-button.tsx index 89ad8d36..ba10d6e6 100644 --- a/src/components/navigate-to-root-button/navigate-to-root-button.tsx +++ b/src/components/navigate-to-root-button/navigate-to-root-button.tsx @@ -1,5 +1,5 @@ import styled from "@emotion/styled"; -import { useLocation, useNavigate } from "react-router-dom"; +import { useNavigate } from "react-router-dom"; import { BackArrow } from "../../assets/icons/icon"; import { PrimaryButton } from "../landing-page/form-elements"; import { useGlobalState } from "../../global-state/context-provider"; @@ -22,10 +22,6 @@ export const NavigateToRootButton = ({ const [, dispatch] = useGlobalState(); const navigate = useNavigate(); - const location = useLocation(); - - const isHome = location.pathname === "/"; - const reset = () => { dispatch({ type: "UPDATE_JOIN_PRODUCTION_OPTIONS", @@ -42,7 +38,6 @@ export const NavigateToRootButton = ({ } navigate("/"); }} - disabled={isHome} > {!header ? : children}