mirror of
https://github.com/makeplane/plane.git
synced 2025-12-19 21:29:32 +01:00
11 lines
305 B
TypeScript
11 lines
305 B
TypeScript
|
|
import { useContext } from "react";
|
||
|
|
import { AppRailContext } from "./context/app-rail-context";
|
||
|
|
|
||
|
|
export const useAppRail = () => {
|
||
|
|
const context = useContext(AppRailContext);
|
||
|
|
if (context === undefined) {
|
||
|
|
throw new Error("useAppRail must be used within AppRailProvider");
|
||
|
|
}
|
||
|
|
return context;
|
||
|
|
};
|