Files
plane/apps/admin/ee/hooks/store/use-instance-feature-flag.ts
T
Prateek ShouryaandGitHub 4f5b162677 [WEB-5136] refactor: update admin ESLint configuration and refactor imports to use type imports (#4463)
* [WEB-5136] refactor: update `admin` ESLint configuration and refactor imports to use type imports

- Enhanced ESLint configuration by adding new rules for import consistency and type imports.
- Refactored multiple files to replace regular imports with type imports for better clarity and performance.
- Ensured consistent use of type imports across the application to align with TypeScript best practices.

* refactor: replace ee regular imports with type imports for improved clarity
2025-10-13 21:09:14 +05:30

12 lines
497 B
TypeScript

import { useContext } from "react";
// context
import { StoreContext } from "@/app/(all)/store.provider";
// plane admin stores
import type { IInstanceFeatureFlagsStore } from "@/plane-admin/store/instance-feature-flags.store";
export const useInstanceFeatureFlags = (): IInstanceFeatureFlagsStore => {
const context = useContext(StoreContext);
if (context === undefined) throw new Error("useInstanceFeatureFlags must be used within StoreProvider");
return context.instanceFeatureFlags;
};