Skip to content

Commit

Permalink
quick nit
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx committed Feb 6, 2025
1 parent b4d5ed4 commit ecf5830
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion web/src/app/admin/settings/SettingsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,13 @@ export function SettingsForm() {
]);
}

const isProSearchDisabled =
combinedSettings?.settings?.pro_search_disabled === null
? combinedSettings?.enterpriseSettings == null
? true
: false
: (combinedSettings?.settings?.pro_search_disabled ?? false);

return (
<div>
{popup}
Expand All @@ -231,7 +238,7 @@ export function SettingsForm() {
<Checkbox
label="Pro Search Disabled"
sublabel="If set, users will not be able to use Pro Search."
checked={settings.pro_search_disabled}
checked={isProSearchDisabled}
onChange={(e) =>
handleToggleSettingsField("pro_search_disabled", e.target.checked)
}
Expand Down

0 comments on commit ecf5830

Please sign in to comment.