Skip to content

Commit

Permalink
enterprise_enabled -> state.enterprise_status?.enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
t-aleksander authored and teon committed Aug 29, 2024
1 parent e81c2f7 commit 27555c7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion web/src/pages/auth/AuthPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const AuthPage = () => {

const setAppStore = useAppStore((state) => state.setState);

const enterpriseEnabled = useAppStore((state) => state.enterprise_enabled);
const enterpriseEnabled = useAppStore((state) => state.enterprise_status?.enabled);

const [params] = useSearchParams();
const redirectUrl = params.get('r');
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/auth/Login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const Login = () => {
} = useApi();
const toaster = useToaster();

const enterpriseEnabled = useAppStore((state) => state.enterprise_enabled);
const enterpriseEnabled = useAppStore((state) => state.enterprise_status?.enabled);
const { data: openIdInfo, isLoading: openIdLoading } = useQuery({
enabled: enterpriseEnabled,
queryKey: [QueryKeys.FETCH_OPENID_INFO],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useAppStore } from '../../../../shared/hooks/store/useAppStore';
import { EnterpriseForm } from './components/EnterpriseForm';

export const EnterpriseSettings = () => {
const enterpriseEnabled = useAppStore((state) => state.enterprise_enabled);
const enterpriseEnabled = useAppStore((state) => state.enterprise_status?.enabled);
const { LL } = useI18nContext();
const localLL = LL.settingsPage.enterpriseOnly;
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { OpenIdGeneralSettings } from './components/OpenIdGeneralSettings';
import { OpenIdSettingsForm } from './components/OpenIdSettingsForm';

export const OpenIdSettings = () => {
const enterpriseEnabled = useAppStore((state) => state.enterprise_enabled);
const enterpriseEnabled = useAppStore((state) => state.enterprise_status?.enabled);
const { LL } = useI18nContext();
const localLL = LL.settingsPage.enterpriseOnly;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const OpenIdGeneralSettings = () => {
} = useApi();

const settings = useSettingsPage((state) => state.settings);
const enterpriseEnabled = useAppStore((state) => state.enterprise_enabled);
const enterpriseEnabled = useAppStore((state) => state.enterprise_status?.enabled);

const queryClient = useQueryClient();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const OpenIdSettingsForm = () => {
const queryClient = useQueryClient();
const docsLink =
'https://defguard.gitbook.io/defguard/admin-and-features/external-openid-providers';
const enterpriseEnabled = useAppStore((state) => state.enterprise_enabled);
const enterpriseEnabled = useAppStore((state) => state.enterprise_status?.enabled);

const {
settings: { fetchOpenIdProviders, addOpenIdProvider, deleteOpenIdProvider },
Expand Down

0 comments on commit 27555c7

Please sign in to comment.