chore: bump @trpc/* and @tanstack/react-query (#13335)

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Omar López <[email protected]>
Co-authored-by: CarinaWolli <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: zomars <[email protected]>
Co-authored-by: Udit Takkar <[email protected]>
Co-authored-by: Benny Joo <[email protected]>
Co-authored-by: Carina Wollendorfer <[email protected]>
Co-authored-by: Gergő Móricz <[email protected]>
Co-authored-by: Keith Williams <[email protected]>
This commit is contained in:
183 files changed
+1203 -1013

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ import type { AppFlags } from "../config";
*
* Entries consist of the feature flag name as the key and the resolved variant's value as the value.
*/
export type Flags = AppFlags;
export type Flags = Partial<AppFlags>;
/**
* Allows you to access the flags from context
+6 -6
View File
@@ -1,12 +1,12 @@
import type { AppFlags } from "@calcom/features/flags/config";
import { trpc } from "@calcom/trpc/react";
export function useFlags() {
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: process.env.NEXT_PUBLIC_IS_E2E
? { "managed-event-types": true, organizations: true, teams: true }
: undefined,
placeholderData: {},
initialData,
});
return query.data ?? ({} as AppFlags);
return query.data ?? {};
}
+2 -2
View File
@@ -7,8 +7,8 @@ export async function getFeatureFlagMap(prisma: PrismaClient) {
orderBy: { slug: "asc" },
cacheStrategy: { swr: 300, ttl: 300 },
});
return flags.reduce<AppFlags>((acc, flag) => {
return flags.reduce((acc, flag) => {
acc[flag.slug as keyof AppFlags] = flag.enabled;
return acc;
}, {} as AppFlags);
}, {} as Partial<AppFlags>);
}