Skip to content

Commit 151306d

Browse files
Denzel KipkemoiDenzel Kipkemoi
authored andcommitted
fix: Changed css for hiding top nav bar to apply to only login esm
1 parent b7a5a76 commit 151306d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/login/login.component.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ const Login: React.FC = () => {
6464
}
6565
}
6666
}, [showPasswordField, showPasswordOnSeparateScreen]);
67+
useEffect(() => {
68+
document.body.classList.add('hide-top-nav');
69+
return () => {
70+
document.body.classList.remove('hide-top-nav');
71+
};
72+
}, []);
6773

6874
const continueLogin = useCallback(() => {
6975
const currentUsername = usernameInputRef.current?.value?.trim();

src/login/login.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '@openmrs/esm-styleguide/src/vars' as *;
44

55
/* Hide OpenMRS top nav on login */
6-
:global(#omrs-top-nav-app-container) {
6+
:global(.hide-top-nav #omrs-top-nav-app-container) {
77
display: none;
88
height: 0;
99
}
@@ -178,6 +178,8 @@
178178
display: flex;
179179
flex-direction: row;
180180
gap: 10rem;
181+
max-width: 100vw;
182+
max-height: 100vh;
181183
}
182184

183185
.image {

0 commit comments

Comments
 (0)