mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
fix(ui): suppress nudges while ui settings are loading
Gate nudgesDisabled on the ui-settings loading state so an admin with disable_ui_nudges on doesn't see the survey prompt flash, and the getInProductNudgesCall fetch doesn't fire, on a cold page load before the flag resolves. Falls back to showing nudges if the fetch errors.
This commit is contained in:
parent
96d819ee7e
commit
920c1c0987
1 changed files with 2 additions and 2 deletions
|
|
@ -91,8 +91,8 @@ function CreateKeyPageContent() {
|
|||
const [modelData, setModelData] = useState<any>({ data: [] });
|
||||
const [createClicked, setCreateClicked] = useState<boolean>(false);
|
||||
|
||||
const { data: uiSettingsData } = useUISettings();
|
||||
const nudgesDisabled = Boolean(uiSettingsData?.values?.disable_ui_nudges);
|
||||
const { data: uiSettingsData, isLoading: uiSettingsLoading } = useUISettings();
|
||||
const nudgesDisabled = uiSettingsLoading || Boolean(uiSettingsData?.values?.disable_ui_nudges);
|
||||
|
||||
// Survey state - always show by default
|
||||
const [showSurveyPrompt, setShowSurveyPrompt] = useState(true);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue