fix(ui): show warning about flag state on unsaved flags

This commit is contained in:
nick-delirium 2023-06-23 12:14:17 +02:00
parent 2980886b31
commit 13e3bc4788

View file

@ -178,6 +178,7 @@ function NewFFlag({ siteId, fflagId }: { siteId: string; fflagId?: string }) {
checked={current.isActive}
name={'persist-flag'}
onChange={() => {
!fflagId && !current.isActive ? toast.success("Feature flag will be enabled upon saving it.") : ""
current.setIsEnabled(!current.isActive);
}}
label={current.isActive ? 'Enabled' : 'Disabled'}