Skip to content

Commit

Permalink
(bug) Fix failing nav-link on patient-outpatient leftNav (openmrs#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldkibet committed Jul 1, 2022
1 parent 6dc77bd commit 7065f06
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/framework/esm-styleguide/src/left-nav/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @module @category UI */
import React from "react";
import { BrowserRouter, useLocation } from "react-router-dom";
import { BrowserRouter } from "react-router-dom";

import { ExtensionSlot, useStore } from "@openmrs/esm-react-utils";
import { createGlobalStore } from "@openmrs/esm-state";
Expand Down Expand Up @@ -32,8 +32,7 @@ type LeftNavMenuProps = SideNavProps;
export const LeftNavMenu = React.forwardRef<HTMLElement, LeftNavMenuProps>(
(props, ref) => {
const { slotName, basePath } = useStore(leftNavStore);
const location = useLocation();
const currentPath = location.pathname;
const currentPath = window.location ?? { pathname: "" };

return (
<BrowserRouter>
Expand Down

0 comments on commit 7065f06

Please sign in to comment.