+1








30ba168fc3
Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Omar López <zomars@me.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Benny Joo <sldisek783@gmail.com> Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Co-authored-by: Gergő Móricz <mo.geryy@gmail.com> Co-authored-by: Keith Williams <keithwillcode@gmail.com>
13 lines
418 B
TypeScript
13 lines
418 B
TypeScript
import type { AppFlags } from "@calcom/features/flags/config";
|
|
import { trpc } from "@calcom/trpc/react";
|
|
|
|
const initialData: Partial<AppFlags> = process.env.NEXT_PUBLIC_IS_E2E
|
|
? { "managed-event-types": true, organizations: true, teams: true }
|
|
: {};
|
|
export function useFlags(): Partial<AppFlags> {
|
|
const query = trpc.viewer.features.map.useQuery(undefined, {
|
|
initialData,
|
|
});
|
|
return query.data ?? {};
|
|
}
|