Skip to content

Commit bd4ed51

Browse files
committed
refactor: standardize import statements and remove unnecessary line breaks in getRemoteConfig
1 parent bb8a4ae commit bd4ed51

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
import { useQuery } from '@tanstack/react-query';
2-
import { ExtractFnReturnType, QueryConfig } from 'src/lib/react-query';
3-
import { RemoteConfig } from "../types";
4-
import { axios } from 'src/lib/axios';
5-
import { useRemoteConfigStore } from "../stores/remoteConfig";
1+
import { useQuery } from '@tanstack/react-query'
2+
import { axios } from 'src/lib/axios'
3+
import { ExtractFnReturnType, QueryConfig } from 'src/lib/react-query'
4+
import { useRemoteConfigStore } from '../stores/remoteConfig'
5+
import { RemoteConfig } from '../types'
66

77
const getRemoteConfig = async (): Promise<RemoteConfig> => {
8-
return axios.get('/data/remoteConfiguration.json');
8+
return axios.get('/data/remoteConfiguration.json')
99
}
1010

11-
type QueryFnType = typeof getRemoteConfig;
11+
type QueryFnType = typeof getRemoteConfig
1212

1313
type UseGetRemoteConfigOptions = {
14-
config?: QueryConfig<QueryFnType>;
15-
};
14+
config?: QueryConfig<QueryFnType>
15+
}
1616
export const useGetRemoteConfig = ({ config }: UseGetRemoteConfigOptions = {}) => {
1717
return useQuery<ExtractFnReturnType<QueryFnType>>({
1818
onSuccess(remoteConfig) {
19-
useRemoteConfigStore.getState().setRemoteConfig(remoteConfig);
19+
useRemoteConfigStore.getState().setRemoteConfig(remoteConfig)
2020
},
2121
...config,
2222
queryKey: ['remote-config'],
2323
queryFn: () => getRemoteConfig(),
24-
});
25-
}
24+
})
25+
}

0 commit comments

Comments
 (0)