Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRappl committed Sep 7, 2021
2 parents faf1ffd + 96fd2f5 commit 3cb0c89
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": ["ts-react-important-stuff", "plugin:prettier/recommended"],
"parser": "@babel/eslint-parser"
"parser": "@babel/eslint-parser",
"ignorePatterns": ["**/*.test.tsx"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React, { useCallback, useMemo, useState } from "react";
import {
LoggedInUser,
useLayoutType,
navigate,
ExtensionSlot,
useAssignedExtensionIds,
ConfigurableLink,
} from "@openmrs/esm-framework";
import {
HeaderContainer,
Expand All @@ -27,8 +27,6 @@ import Logo from "../logo/logo.component";
import styles from "./navbar.component.scss";
import OfflineBanner from "../offline-banner/offline-banner.component";

const HeaderLink: any = HeaderName;

export interface NavbarProps {
user: LoggedInUser;
allowedLocales: Array<string>;
Expand Down Expand Up @@ -85,15 +83,12 @@ const Navbar: React.FC<NavbarProps> = ({
isActive={isActivePanel("sideMenu")}
/>
)}
<HeaderLink
prefix=""
onClick={() => {
navigate({ to: "${openmrsSpaBase}/home" });
hidePanel();
}}
<ConfigurableLink
className="bx--header__name"
to="${openmrsSpaBase}/home"
>
<Logo />
</HeaderLink>
</ConfigurableLink>
<ExtensionSlot
className={styles.dividerOverride}
extensionSlotName="top-nav-info-slot"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jest.mock("@openmrs/esm-framework", () => ({
}),
refetchCurrentUser: jest.fn(),
subscribeConnectivity: jest.fn(),
navigate: jest.fn(),
ConfigurableLink: jest.fn(() => {
return <a href="#">Mock EMR</a>;
}),
}));

jest.mock("./root.resource", () => ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.breadcrumbs-container {
nav.breadcrumbs-container {
padding: 1rem;

nav ol li {
ol li {
display: inline-flex;
}
}
42 changes: 42 additions & 0 deletions pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## Requirements

- [ ] My work conforms to the [**OpenMRS 3.0 Styleguide**](https://om.rs/styleguide).
- [ ] I checked for feature overlap with [**existing widgets**](https://om.rs/directory).


## Summary

<!--
Required.
Please describe what problems your PR addresses.
-->


## Screenshots

*None.*
<!--
Optional.
If possible, please insert any screenshots/videos of your changes here.
Don't forget to remove the *None.* above if you do fill this section.
-->


## Related Issue

*None.*
<!--
Optional.
If present, please link any related issue here, e.g. "https://issues.openmrs.org/browse/123").
Don't forget to remove the *None.* above if you do fill this section.
-->


## Other

*None.*
<!--
Optional.
Anything else that isn't covered by one of the sections above.
Don't forget to remove the *None.* above if you do fill this section.
-->

0 comments on commit 3cb0c89

Please sign in to comment.