Skip to content

Commit

Permalink
Edit Gml.Web.Client
Browse files Browse the repository at this point in the history
  • Loading branch information
Arsenii1109 committed Jun 27, 2024
1 parent cf42244 commit 3494ca1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/core/providers/QueryProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ export function QueryProvider({ children }: PropsWithChildren) {
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
retry: (failureCount, error) => {
return !(
isAxiosError(error) && error.response?.data.statusCode === HttpStatusCode.NotFound
);
},
retry: false,
},
},
}),
Expand Down
16 changes: 16 additions & 0 deletions src/shared/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,19 @@ export const HREF_GET_DATALIFE_ENGINE_AUTH_PHP =
"https://raw.githubusercontent.com/GamerVII-NET/Gml.Modules.Auth/master/DLE/auth.php";
export const HREF_DOCUMENTATION_CUSTOM_ENDPOINT =
"https://gml-launcher.github.io/Gml.Docs/integrations-auth-custom.html";

export const DEFAULT_TIMEOUT = 30000;
export const RETRY_DELAY_MAX = 10;
export const RETRY_ATTEMPTS_MAX = 5;
export const OFFLINE_RETRY_DELAY = 2000;
export const OFFLINE_RETRY_ATTEMPTS_MAX = 0;
export const SECOND = 1000;
export const MINUTE = 60 * SECOND;
export const HOUR = 60 * MINUTE;
export const DAY = 24 * HOUR;
export const WEEK = 7 * DAY;
export const MONTH = 4 * WEEK;
export const YEAR = 12 * MONTH;
export const MINUTE_IN_SECONDS = 60;
export const HOUR_IN_SECONDS = 60 * MINUTE_IN_SECONDS;
export const DAY_IN_SECONDS = 24 * HOUR_IN_SECONDS;
2 changes: 0 additions & 2 deletions src/shared/hooks/useIntegraions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ export const useConnectTextures = (type: TexturesServiceType) => {
queryKey: [`get-connect-textures-${type}`],
queryFn: () => integrationService.getConnectTextures({ type }),
select: ({ data }) => data,
retry: true,
staleTime: 1000,
});
};

Expand Down

0 comments on commit 3494ca1

Please sign in to comment.