* [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
12 lines
497 B
TypeScript
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;
|
|
};
|