@@ -16,21 +16,22 @@ import {
1616} from '@tabler/icons-react' ;
1717import { FC , useEffect } from 'react' ;
1818import { useNavbarStyles } from './styles' ;
19- import { useLocation , useParams } from 'react-router-dom' ;
19+ import { useLocation , useParams } from 'react-router-dom' ;
2020import { useGetLogStreamList } from '@/hooks/useGetLogStreamList' ;
2121import { notifications } from '@mantine/notifications' ;
2222import { useNavigate } from 'react-router-dom' ;
2323import { DEFAULT_FIXED_DURATIONS , useHeaderContext } from '@/layouts/MainLayout/Context' ;
2424import useMountedState from '@/hooks/useMountedState' ;
2525import dayjs from 'dayjs' ;
2626import { useDisclosure } from '@mantine/hooks' ;
27- import { USERS_MANAGEMENT_ROUTE } from '@/constants/routes' ;
27+ import { USERS_MANAGEMENT_ROUTE } from '@/constants/routes' ;
2828import { useDeleteLogStream } from '@/hooks/useDeleteLogStream' ;
2929import InfoModal from './infoModal' ;
3030import { useGetUserRole } from '@/hooks/useGetUserRoles' ;
3131import { getStreamsSepcificAccess , getUserSepcificStreams } from './rolesHandler' ;
3232import { LogStreamData } from '@/@types/parseable/api/stream' ;
3333import Cookies from 'js-cookie' ;
34+ import { NAVBAR_WIDTH } from '@/constants/theme' ;
3435const baseURL = import . meta. env . VITE_PARSEABLE_URL ?? '/' ;
3536
3637const links = [
@@ -47,7 +48,7 @@ const Navbar: FC<NavbarProps> = (props) => {
4748 const { streamName } = useParams ( ) ;
4849 const location = useLocation ( ) ;
4950
50- const username = Cookies . get ( 'username' )
51+ const username = Cookies . get ( 'username' ) ;
5152
5253 const {
5354 state : { subNavbarTogle } ,
@@ -78,7 +79,7 @@ const Navbar: FC<NavbarProps> = (props) => {
7879 Cookies . remove ( 'session' ) ;
7980 Cookies . remove ( 'username' ) ;
8081
81- window . location . href = `${ baseURL } api/v1/o/logout?redirect=${ window . location . origin } /login` ;
82+ window . location . href = `${ baseURL } api/v1/o/logout?redirect=${ window . location . origin } /login` ;
8283 } ;
8384
8485 const {
@@ -179,8 +180,8 @@ const Navbar: FC<NavbarProps> = (props) => {
179180 } , [ username ] ) ;
180181
181182 useEffect ( ( ) => {
182- if ( streams && streams . length > 0 && roles ) {
183- const userStreams = getUserSepcificStreams ( roles , streams as any ) ;
183+ if ( streams && streams . length > 0 && roles ) {
184+ const userStreams = getUserSepcificStreams ( roles , streams as any ) ;
184185 setUserSepecficStreams ( userStreams as any ) ;
185186 }
186187 } , [ roles , streams ] ) ;
@@ -202,7 +203,13 @@ const Navbar: FC<NavbarProps> = (props) => {
202203 modalCancelBtn,
203204 } = classes ;
204205 return (
205- < MantineNavbar { ...props } withBorder zIndex = { 1 } hiddenBreakpoint = { window . outerWidth + 20 } hidden = { isSubNavbarOpen } >
206+ < MantineNavbar
207+ { ...props }
208+ withBorder
209+ zIndex = { 1 }
210+ hiddenBreakpoint = { window . outerWidth + 20 }
211+ hidden = { isSubNavbarOpen }
212+ width = { { xs : `${ NAVBAR_WIDTH } px` } } >
206213 < MantineNavbar . Section grow className = { container } >
207214 < NavLink label = "Log Streams" icon = { < IconBinaryTree2 size = "1.5rem" stroke = { 1.3 } /> } className = { streamsBtn } />
208215 < Select
0 commit comments