Skip to content

Commit

Permalink
Merge pull request #1659 from zetkin/issue-1610/calendar-filter
Browse files Browse the repository at this point in the history
Issue-1610/ Fix pane when url changes
  • Loading branch information
rebecarubio authored Nov 22, 2023
2 parents 96c5f59 + 62f049c commit 0ab1f71
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/utils/panes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { makeStyles } from '@mui/styles';
import { useRouter } from 'next/router';
import { Box, Paper, Slide } from '@mui/material';
import {
createContext,
FC,
ReactNode,
useContext,
useEffect,
useRef,
useState,
} from 'react';
Expand Down Expand Up @@ -57,10 +59,15 @@ export const PaneProvider: FC<PaneProviderProps> = ({
const [open, setOpen] = useState(false);
const styles = useStyles();
const [key, setKey] = useState(0);
const { pathname } = useRouter();

const { paneContainerRef, slideRef, updatePaneHeight } =
useResizablePane(fixedHeight);

useEffect(() => {
setOpen(false);
}, [pathname]);

return (
<PaneContext.Provider
value={{
Expand Down

0 comments on commit 0ab1f71

Please sign in to comment.