mirror of
https://github.com/gosticks/plane.git
synced 2025-10-16 12:45:33 +00:00
* fix: layout structure in admin * fix: layout structure in admin * fix: delete layout files * chore: updated form related info * fix: admin import statements * fix: general page unauthorized flickering issue * chore: logs related * chore: lock file updates * fix: build errors * fix: coderabbit suggestions
11 lines
382 B
TypeScript
11 lines
382 B
TypeScript
import { useContext } from "react";
|
|
// store
|
|
import { StoreContext } from "@/app/(all)/store.provider";
|
|
import { IInstanceStore } from "@/store/instance.store";
|
|
|
|
export const useInstance = (): IInstanceStore => {
|
|
const context = useContext(StoreContext);
|
|
if (context === undefined) throw new Error("useInstance must be used within StoreProvider");
|
|
return context.instance;
|
|
};
|