Skip to content

Commit 8c37191

Browse files
committed
fix wrong vars naming
1 parent 7141e7d commit 8c37191

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/features/remoteConfig/api/getRemoteConfig.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ import { RemoteConfig } from "../types";
44
import { axios } from 'src/lib/axios';
55
import { useRemoteConfigStore } from "../stores/remoteConfig";
66

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

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

13-
type UseGetAdOptions = {
13+
type UseGetRemoteConfigOptions = {
1414
config?: QueryConfig<QueryFnType>;
1515
};
16-
export const useGetRemoteConfig = ({ config }: UseGetAdOptions = {}) => {
16+
export const useGetRemoteConfig = ({ config }: UseGetRemoteConfigOptions = {}) => {
1717
return useQuery<ExtractFnReturnType<QueryFnType>>({
1818
onSuccess(remoteConfig) {
1919
useRemoteConfigStore.getState().setRemoteConfig(remoteConfig);
2020
},
2121
...config,
2222
queryKey: ['remote-config'],
23-
queryFn: () => getAd(),
23+
queryFn: () => getRemoteConfig(),
2424
});
2525
}

0 commit comments

Comments
 (0)