Skip to content

Commit f65874a

Browse files
committed
Lint
1 parent b8161eb commit f65874a

File tree

3 files changed

+17
-20
lines changed

3 files changed

+17
-20
lines changed

frontend/src/components/AuthPage/SignIn/BasicSignIn/BasicSignIn.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { Controller, FormProvider, useForm } from 'react-hook-form';
55
import { useAuthenticate } from 'lib/hooks/api/appConfig';
66
import AlertIcon from 'components/common/Icons/AlertIcon';
77
import { useNavigate } from 'react-router-dom';
8+
import { useQueryClient } from '@tanstack/react-query';
89

910
import * as S from './BasicSignIn.styled';
10-
import { useQueryClient } from '@tanstack/react-query';
1111

1212
interface FormValues {
1313
username: string;
@@ -28,7 +28,7 @@ function BasicSignIn() {
2828
if (response.raw.url.includes('error')) {
2929
methods.setError('root', { message: 'error' });
3030
} else {
31-
await client.invalidateQueries({queryKey: ['app', 'info']});
31+
await client.invalidateQueries({ queryKey: ['app', 'info'] });
3232
navigate('/');
3333
}
3434
},

frontend/src/components/contexts/GlobalSettingsContext.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ export const GlobalSettingsProvider: React.FC<
2727
return;
2828
}
2929

30-
const features = info?.data?.response.enabledFeatures
30+
const features = info?.data?.response.enabledFeatures;
3131

3232
if (features) {
3333
setValue({
3434
hasDynamicConfig: features.includes(
3535
ApplicationInfoEnabledFeaturesEnum.DYNAMIC_CONFIG
3636
),
37-
})
37+
});
3838
}
3939
}, [info.data]);
4040

frontend/src/lib/hooks/api/appConfig.ts

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,21 @@ export function useAuthenticate() {
2828
}
2929

3030
export function useAppInfo() {
31-
return useQuery(
32-
['app', 'info'],
33-
async () => {
34-
const data = await appConfig.getApplicationInfoRaw()
31+
return useQuery(['app', 'info'], async () => {
32+
const data = await appConfig.getApplicationInfoRaw();
3533

36-
let response: ApplicationInfo = {}
37-
try {
38-
response = await data.value()
39-
} catch {
40-
response = {}
41-
}
34+
let response: ApplicationInfo = {};
35+
try {
36+
response = await data.value();
37+
} catch {
38+
response = {};
39+
}
4240

43-
return {
44-
redirect: data.raw.url.includes('auth'),
45-
response,
46-
}
47-
},
48-
);
41+
return {
42+
redirect: data.raw.url.includes('auth'),
43+
response,
44+
};
45+
});
4946
}
5047

5148
export function useAppConfig() {

0 commit comments

Comments
 (0)