Properly update chapter list window scroll
Once the window scroller was set, resizing the window to increase the width did not remove the window scroller again
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import useMediaQuery from '@mui/material/useMediaQuery';
|
||||
import { Breakpoint } from '@mui/material/styles';
|
||||
import { getCurrentTheme } from '@/theme.ts';
|
||||
|
||||
export class MediaQuery {
|
||||
@@ -14,7 +15,11 @@ export class MediaQuery {
|
||||
return useMediaQuery('not (pointer: fine)');
|
||||
}
|
||||
|
||||
static useIsBelowWidth(breakpoint: Breakpoint): boolean {
|
||||
return useMediaQuery(getCurrentTheme().breakpoints.down(breakpoint));
|
||||
}
|
||||
|
||||
static useIsMobileWidth(): boolean {
|
||||
return useMediaQuery(getCurrentTheme().breakpoints.down('sm'));
|
||||
return this.useIsBelowWidth('sm');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user