@@ -9,10 +9,22 @@ import Export from "./Export";
99import Image from "next/image" ;
1010import Searchbar from "./Searchbar" ;
1111import navbarView from "styles/navbar.module.scss" ;
12+ import { useEffect , useState } from "react" ;
1213
1314const GlobalNavbar : React . FC = ( ) => {
1415 const userAuth = useAuth ( ) ;
1516 const user = authService . getUser ( ) ;
17+ let [ isMobile , setIsMobile ] = useState < boolean | null > ( null ) ;
18+
19+ useEffect ( ( ) => {
20+ setIsMobile ( window . innerWidth <= 767.98 ) ;
21+
22+ const checkWindowWidth = ( ) => {
23+ setIsMobile ( window . innerWidth <= 767.98 ) ;
24+ } ;
25+
26+ window . addEventListener ( "resize" , checkWindowWidth ) ;
27+ } , [ ] ) ;
1628
1729 const router = useRouter ( ) ;
1830 function authButton ( ) {
@@ -53,7 +65,7 @@ const GlobalNavbar: React.FC = () => {
5365 return (
5466 < Navbar
5567 expand = "md"
56- fixed = "top "
68+ fixed = "bottom "
5769 style = { {
5870 borderBottom : "1px solid" ,
5971 height : "auto" ,
@@ -62,19 +74,20 @@ const GlobalNavbar: React.FC = () => {
6274 className = "bg-body-tertiary"
6375 >
6476 < Container className = { navbarView . navContainer } >
65- < Navbar . Brand
66- onClick = { ( ) => router . push ( "/" ) }
67- className = { `cursor-pointer ${ navbarView . navBrand } ` }
68- >
69- < Image
70- src = "/basic-f-v2-dark-mode-v2-fav.png"
71- width = "38"
72- height = "30"
73- className = "d-inline-block align-top"
74- alt = "findFirst logo"
75- />
76- FindFirst
77- </ Navbar . Brand >
77+ { isMobile ? (
78+ < Navbar . Brand
79+ onClick = { ( ) => router . push ( "/" ) }
80+ className = { ` ${ navbarView . navBrand } ` }
81+ >
82+ < Image
83+ src = "/basic-f-v2-dark-mode-v2-fav.png"
84+ width = "38"
85+ height = "30"
86+ className = "d-inline-block align-top"
87+ alt = "FindFirst Logo"
88+ />
89+ </ Navbar . Brand >
90+ ) : null }
7891
7992 { /* Search bar stays visible always */ }
8093 { userAuth === AuthStatus . Authorized ? < Searchbar /> : null }
0 commit comments