mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-13 12:55:19 +00:00
10 lines
308 B
TypeScript
10 lines
308 B
TypeScript
|
|
'use client';
|
||
|
|
|
||
|
|
import { Entitlement, entitlementsByPlan } from "./constants";
|
||
|
|
import { usePlan } from "./usePlan";
|
||
|
|
|
||
|
|
export const useHasEntitlement = (entitlement: Entitlement) => {
|
||
|
|
const plan = usePlan();
|
||
|
|
const entitlements = entitlementsByPlan[plan];
|
||
|
|
return entitlements.includes(entitlement);
|
||
|
|
}
|