Skip to content

Commit

Permalink
fix: removed btn-disable when user is on root
Browse files Browse the repository at this point in the history
  • Loading branch information
malmen237 committed May 2, 2024
1 parent cd22efe commit e71b236
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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",
Expand All @@ -42,7 +38,6 @@ export const NavigateToRootButton = ({
}
navigate("/");
}}
disabled={isHome}
>
{!header ? <BackArrow /> : children}
</StyledBackBtn>
Expand Down

0 comments on commit e71b236

Please sign in to comment.