The Open Source DocuSign Alternative.
TypeScript digital-signaturedocument-signingdocusign-alternativee-signatureesignesignaturenext-authnextjsopen-sourcepades-standardpdfpdf-signpdf-signaturepostgresqlprismaself-hostedsigningtypescript
fix: extract feature-flag zod schema to separate file
Mythie81e612040a94
diff --git a/apps/web/src/providers/feature-flag.tsx b/apps/web/src/providers/feature-flag.tsxindex 58d1bff63..0a09fe0f0 100644--- a/apps/web/src/providers/feature-flag.tsx+++ b/apps/web/src/providers/feature-flag.tsx@@ -2,8 +2,6 @@import { createContext, useCallback, useContext, useEffect, useState } from 'react';-import { z } from 'zod';-import {FEATURE_FLAG_POLL_INTERVAL,LOCAL_FEATURE_FLAGS,@@ -12,14 +10,7 @@ import {import { getAllFlags } from '~/helpers/get-feature-flag';-export const ZFeatureFlagValueSchema = z.union([- z.boolean(),- z.string(),- z.number(),- z.undefined(),-]);--export type TFeatureFlagValue = z.infer<typeof ZFeatureFlagValueSchema>;+import { TFeatureFlagValue } from './feature-flag.types';export type FeatureFlagContextValue = {getFlag: (_key: string) => TFeatureFlagValue;diff --git a/apps/web/src/providers/feature-flag.types.ts b/apps/web/src/providers/feature-flag.types.tsnew file mode 100644index 000000000..1654a188c--- /dev/null+++ b/apps/web/src/providers/feature-flag.types.ts@@ -0,0 +1,10 @@+import { z } from 'zod';++export const ZFeatureFlagValueSchema = z.union([+ z.boolean(),+ z.string(),+ z.number(),+ z.undefined(),+]);++export type TFeatureFlagValue = z.infer<typeof ZFeatureFlagValueSchema>;