Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Jul 4, 2024
1 parent 81cd50e commit d45a7d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ interface versionQueryResponse {
}

export const useGetVersionQuery: useQueryFunctionType<
undefined,versionQueryResponse
undefined,
versionQueryResponse
> = (_, onFetch) => {
const { query } = UseRequestProcessor();

Expand All @@ -33,7 +34,7 @@ export const useGetVersionQuery: useQueryFunctionType<

const queryResult = query(["useGetVersionQuery"], async () => {
const { data } = await getVersionFn();
return responseFn(data);;
return responseFn(data);
});

return queryResult;
Expand Down
11 changes: 3 additions & 8 deletions src/frontend/src/types/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,9 @@ export type ResponseErrorDetailAPI = {
response: { data: { detail: string } };
};

export type useQueryFunctionType<T=undefined, R=any> = T extends undefined?
(
props?: T,
onFetch?: ((data: R) => void) | string,
) => UseQueryResult<R>:(
props: T,
onFetch?: ((data: R) => void) | string,
) => UseQueryResult<R>;
export type useQueryFunctionType<T = undefined, R = any> = T extends undefined
? (props?: T, onFetch?: ((data: R) => void) | string) => UseQueryResult<R>
: (props: T, onFetch?: ((data: R) => void) | string) => UseQueryResult<R>;

export type QueryFunctionType = (
queryKey: UndefinedInitialDataOptions["queryKey"],
Expand Down

0 comments on commit d45a7d7

Please sign in to comment.