Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/common/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* graphic logo is a trademark of OpenMRS Inc.
*/

export const bahmniHomePath = '/bahmni/home';

const noOfFormsExportLimit = 20;
export const commonConstants = {
responseType: {
Expand Down
36 changes: 21 additions & 15 deletions src/form-builder/components/FormBuilderHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,28 @@
*/

import React from 'react';
import { bahmniHomePath } from '../../common/constants';

const Header = () =>
<div>
<div className="header-wrap">
<header className="header">
<nav className="nav">
<ul>
<li>
<a className="back-btn" href="/bahmni/home">
<i className="fa fa-home"></i>
</a>
</li>
</ul>
</nav>
</header>
const Header = () => {
const homeUrl = (typeof localStorage !== 'undefined' && localStorage.getItem('homeUrl'))
|| bahmniHomePath;
return (
<div>
<div className="header-wrap">
<header className="header">
<nav className="nav">
<ul>
<li>
<a className="back-btn" href={homeUrl}>
<i className="fa fa-home"></i>
</a>
</li>
</ul>
</nav>
</header>
</div>
</div>
</div>;
);
};

export default Header;
Loading