2022-05-02 20:39:35 +00:00
|
|
|
import { UserPlan } from "@prisma/client";
|
2022-04-04 15:44:04 +00:00
|
|
|
|
2022-04-08 05:33:24 +00:00
|
|
|
/**
|
|
|
|
* TODO: It should be exposed at a single place.
|
|
|
|
*/
|
2022-04-04 15:44:04 +00:00
|
|
|
export function useExposePlanGlobally(plan: UserPlan) {
|
|
|
|
// Don't wait for component to mount. Do it ASAP. Delaying it would delay UI Configuration.
|
|
|
|
if (typeof window !== "undefined") {
|
|
|
|
// This variable is used by embed-iframe to determine if we should allow UI configuration
|
|
|
|
window.CalComPlan = plan;
|
|
|
|
}
|
|
|
|
}
|