You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bazarr/frontend/src/contexts/Navbar.ts

19 lines
389 B

import { createContext, useContext } from "react";
const NavbarContext = createContext<{
showed: boolean;
show: (showed: boolean) => void;
} | null>(null);
export function useNavbar() {
const context = useContext(NavbarContext);
if (context === null) {
throw new Error("NavbarShowedContext not initialized");
}
return context;
}
export default NavbarContext.Provider;