Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
t-aleksander committed Aug 12, 2024
1 parent 455d188 commit 360ea36
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
1 change: 0 additions & 1 deletion web/src/components/AppLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export const AppLoader = () => {

useQuery([QueryKeys.FETCH_ENTERPRISE_STATUS], getEnterpriseStatus, {
onSuccess: (status) => {
console.log(status)
setAppStore({ enterprise_enabled: status.enabled });
},
onError: (err) => {
Expand Down
16 changes: 7 additions & 9 deletions web/src/pages/auth/Login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
ButtonStyleVariant,
} from '../../../shared/defguard-ui/components/Layout/Button/types';
import { LoaderSpinner } from '../../../shared/defguard-ui/components/Layout/LoaderSpinner/LoaderSpinner';
import { useAppStore } from '../../../shared/hooks/store/useAppStore';
import { useAuthStore } from '../../../shared/hooks/store/useAuthStore';
import useApi from '../../../shared/hooks/useApi';
import { MutationKeys } from '../../../shared/mutations';
Expand All @@ -23,7 +24,6 @@ import { QueryKeys } from '../../../shared/queries';
import { LoginData } from '../../../shared/types';
import { trimObjectStrings } from '../../../shared/utils/trimObjectStrings';
import { OpenIdLoginButton } from './components/OidcButtons';
import { useAppStore } from '../../../shared/hooks/store/useAppStore';

type Inputs = {
username: string;
Expand Down Expand Up @@ -103,7 +103,7 @@ export const Login = () => {

return (
<section id="login-container">
{(!enterpriseEnabled || !openIdLoading) ? (
{!enterpriseEnabled || !openIdLoading ? (
<>
<h1>{LL.loginPage.pageTitle()}</h1>
<form onSubmit={handleSubmit(onSubmit)}>
Expand All @@ -130,16 +130,14 @@ export const Login = () => {
text={LL.form.login()}
data-testid="login-form-submit"
/>
{
enterpriseEnabled && openIdInfo && (
<OpenIdLoginButton url={openIdInfo.url} />
)
}
</form >
{enterpriseEnabled && openIdInfo && (
<OpenIdLoginButton url={openIdInfo.url} />
)}
</form>
</>
) : (
<LoaderSpinner size={80} />
)}
</section >
</section>
);
};
2 changes: 1 addition & 1 deletion web/src/pages/settings/SettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import { Card } from '../../shared/defguard-ui/components/Layout/Card/Card';
import { CardTabs } from '../../shared/defguard-ui/components/Layout/CardTabs/CardTabs';
import { CardTabsData } from '../../shared/defguard-ui/components/Layout/CardTabs/types';
import { LoaderSpinner } from '../../shared/defguard-ui/components/Layout/LoaderSpinner/LoaderSpinner';
import { useAppStore } from '../../shared/hooks/store/useAppStore';
import useApi from '../../shared/hooks/useApi';
import { QueryKeys } from '../../shared/queries';
import { GlobalSettings } from './components/GlobalSettings/GlobalSettings';
import { LdapSettings } from './components/LdapSettings/LdapSettings';
import { OpenIdSettings } from './components/OpenIdSettings/OpenIdSettings';
import { SmtpSettings } from './components/SmtpSettings/SmtpSettings';
import { useSettingsPage } from './hooks/useSettingsPage';
import { useAppStore } from '../../shared/hooks/store/useAppStore';

const tabsContent: ReactNode[] = [
<GlobalSettings key={0} />,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ export const OpenIdSettingsForm = () => {
styleVariant={ButtonStyleVariant.CONFIRM}
loading={isLoading}
onClick={() => {
console.log('delete');
handleDeleteProvider();
}}
/>
Expand Down

0 comments on commit 360ea36

Please sign in to comment.