diff --git a/src/AppBar.tsx b/src/AppBar.tsx index 3bf783cd9..a9cf027f3 100644 --- a/src/AppBar.tsx +++ b/src/AppBar.tsx @@ -31,6 +31,7 @@ import styles from "./AppBar.module.css"; interface AppBarContext { setTitle: (value: string) => void; setSecondaryButton: (value: ReactNode) => void; + setHidden: (value: boolean) => void; } const AppBarContext = createContext(null); @@ -52,15 +53,17 @@ export const AppBar: FC = ({ children }) => { }, []); const [title, setTitle] = useState(""); + const [hidden, setHidden] = useState(false); const [secondaryButton, setSecondaryButton] = useState(null); const context = useMemo( - () => ({ setTitle, setSecondaryButton }), - [setTitle, setSecondaryButton], + () => ({ setTitle, setSecondaryButton, setHidden }), + [setTitle, setHidden, setSecondaryButton], ); return ( <>