mirror of
https://github.com/makeplane/plane.git
synced 2025-12-28 16:06:33 +01:00
* dev: initialize feature flagging * dev: feature flagging workspace active cycles * dev: update feature flag implementation * dev: add `FEATURE_FLAG_SERVER_AUTH_TOKEN` env * dev: add feature flagging for backend apis * dev: setup feature flags store and hooks. (#558) * dev: setup feature flags store and hooks. * minor improvements for swr key and flags enum. * dev: workspace active cycles feature flag. (#562) * dev: add task for cancelling the workspace subscription when the workspace is deleted * dev: rename feaure flagging component * dev: update feature flagging function for spaces * dev: add feature flags for bulk ops, issue embeds and page publish. (#589) * dev: add logging for member sync task * dev: restrict workspace from deleting if the subscription is active * dev: workspace delete check endpoint * dev: subscription endpoint check * dev: update subscriptions * chore: plane pro billing and plans page updates. * dev: update pro pill display logic. * dev: fix feature flagging * chore: minor improvement in cloud-badge to avoid API calls to `products` endpoint if user has PRO subscription. --------- Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com> Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
12 lines
446 B
TypeScript
12 lines
446 B
TypeScript
import { useContext } from "react";
|
|
// context
|
|
import { StoreContext } from "@/lib/store-context";
|
|
// plane web stores
|
|
import { IFeatureFlagsStore } from "@/plane-web/store/feature-flags/feature-flags.store";
|
|
|
|
export const useFeatureFlags = (): IFeatureFlagsStore => {
|
|
const context = useContext(StoreContext);
|
|
if (context === undefined) throw new Error("useFeatureFlags must be used within StoreProvider");
|
|
return context.featureFlags;
|
|
};
|