File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { useFetcher } from "@remix-run/react" ;
22import type { ActionFunctionArgs , LoaderFunctionArgs } from "@remix-run/server-runtime" ;
33import { useEffect , useState } from "react" ;
4+ import stableStringify from "json-stable-stringify" ;
45import { json } from "@remix-run/server-runtime" ;
56import { redirect , typedjson , useTypedLoaderData } from "remix-typedjson" ;
67import { prisma } from "~/db.server" ;
@@ -88,7 +89,7 @@ export default function AdminFeatureFlagsRoute() {
8889 }
8990 } , [ saveFetcher . data ] ) ;
9091
91- const isDirty = JSON . stringify ( values ) !== JSON . stringify ( initialValues ) ;
92+ const isDirty = stableStringify ( values ) !== stableStringify ( initialValues ) ;
9293 const isSaving = saveFetcher . state === "submitting" ;
9394
9495 const setFlagValue = ( key : string , value : unknown ) => {
@@ -117,6 +118,7 @@ export default function AdminFeatureFlagsRoute() {
117118 < div className = "max-w-2xl space-y-4" >
118119 < p className = "text-sm text-text-dimmed" >
119120 Global defaults for all organizations. Org-level overrides take precedence.
121+ When not set, each consumer uses its own default.
120122 </ p >
121123
122124 < div className = "flex flex-col gap-1.5" >
You can’t perform that action at this time.
0 commit comments