catalog-react: fix filters re-render on small screens

Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
Vincenzo Scamporlino
2024-12-05 11:01:30 +01:00
parent 45b5f3440f
commit dff228f7b0
@@ -34,8 +34,10 @@ export const Filters = (props: {
drawerAnchor?: 'left' | 'right' | 'top' | 'bottom';
};
}) => {
const isScreenSmallerThanBreakpoint = useMediaQuery((theme: Theme) =>
theme.breakpoints.down(props.options?.drawerBreakpoint ?? 'md'),
const isScreenSmallerThanBreakpoint = useMediaQuery(
(theme: Theme) =>
theme.breakpoints.down(props.options?.drawerBreakpoint ?? 'md'),
{ noSsr: true },
);
const theme = useTheme();
const [filterDrawerOpen, setFilterDrawerOpen] = useState<boolean>(false);